]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: Remove extra reference count bumps in btrfs_compare_trees
authorNikolay Borisov <nborisov@suse.com>
Wed, 15 Aug 2018 15:26:55 +0000 (18:26 +0300)
committerDavid Sterba <dsterba@suse.com>
Mon, 17 Dec 2018 13:51:30 +0000 (14:51 +0100)
commit05d68ee21b77adbfcd426f818581fd15e5224437
treebba91c499bb333037ed2dc0eed5b05e57667ccf5
parentc93ce3040752059817c5e816c80708c22dfa0653
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>
fs/btrfs/ctree.c