Commit df66916e authored by Li Dongyang's avatar Li Dongyang Committed by Chris Mason

Btrfs: skip btrfs_release_path in btrfs_update_root and btrfs_del_root

We don't need to call btrfs_release_path because btrfs_free_path will do
that for us.
Signed-off-by: default avatarLi Dongyang <Jerry87905@gmail.com>
Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
parent 5df6a9f6
...@@ -159,7 +159,6 @@ int btrfs_update_root(struct btrfs_trans_handle *trans, struct btrfs_root ...@@ -159,7 +159,6 @@ int btrfs_update_root(struct btrfs_trans_handle *trans, struct btrfs_root
write_extent_buffer(l, item, ptr, sizeof(*item)); write_extent_buffer(l, item, ptr, sizeof(*item));
btrfs_mark_buffer_dirty(path->nodes[0]); btrfs_mark_buffer_dirty(path->nodes[0]);
out: out:
btrfs_release_path(root, path);
btrfs_free_path(path); btrfs_free_path(path);
return ret; return ret;
} }
...@@ -332,7 +331,6 @@ int btrfs_del_root(struct btrfs_trans_handle *trans, struct btrfs_root *root, ...@@ -332,7 +331,6 @@ int btrfs_del_root(struct btrfs_trans_handle *trans, struct btrfs_root *root,
BUG_ON(refs != 0); BUG_ON(refs != 0);
ret = btrfs_del_item(trans, root, path); ret = btrfs_del_item(trans, root, path);
out: out:
btrfs_release_path(root, path);
btrfs_free_path(path); btrfs_free_path(path);
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment