When the 2 comparison treees roots are initialised they are private to
the function and already have referencecounts 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 <nbori...@suse.com>
---
 fs/btrfs/ctree.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c
index c3d298580bc9..be0eb26fd4eb 100644
--- a/fs/btrfs/ctree.c
+++ b/fs/btrfs/ctree.c
@@ -5413,7 +5413,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;
@@ -5424,7 +5423,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)
-- 
2.7.4

Reply via email to