summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ctree.c
diff options
context:
space:
mode:
authorNikolay Borisov2018-08-15 17:26:55 +0200
committerDavid Sterba2018-12-17 14:51:30 +0100
commit8c7eeb6557877e3272f3105955ca103ee351f16d (patch)
treebba91c499bb333037ed2dc0eed5b05e57667ccf5 /fs/btrfs/ctree.c
parentbtrfs: Remove extraneous extent_buffer_get from tree_mod_log_rewind (diff)
downloadkernel-qcow2-linux-8c7eeb6557877e3272f3105955ca103ee351f16d.tar.gz
kernel-qcow2-linux-8c7eeb6557877e3272f3105955ca103ee351f16d.tar.xz
kernel-qcow2-linux-8c7eeb6557877e3272f3105955ca103ee351f16d.zip
btrfs: Remove extra reference count bumps in btrfs_compare_trees
When the 2 comparison trees roots are initialised they are private to the function and already have reference counts of 1 each. There is no need to further increment the reference count since the cloned buffers are already accessed via struct btrfs_path. Eventually the 2 paths used for comparison are going to be released, effectively disposing of the cloned buffers. Signed-off-by: Nikolay Borisov <nborisov@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/ctree.c')
-rw-r--r--fs/btrfs/ctree.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c
index c1afcc269313..a436259c71b1 100644
--- a/fs/btrfs/ctree.c
+++ b/fs/btrfs/ctree.c
@@ -5388,7 +5388,6 @@ int btrfs_compare_trees(struct btrfs_root *left_root,
ret = -ENOMEM;
goto out;
}
- extent_buffer_get(left_path->nodes[left_level]);
right_level = btrfs_header_level(right_root->commit_root);
right_root_level = right_level;
@@ -5399,7 +5398,6 @@ int btrfs_compare_trees(struct btrfs_root *left_root,
ret = -ENOMEM;
goto out;
}
- extent_buffer_get(right_path->nodes[right_level]);
up_read(&fs_info->commit_root_sem);
if (left_level == 0)