]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: remove unnecessary leaf check at btrfs_tree_mod_log_free_eb()
authorFilipe Manana <fdmanana@suse.com>
Thu, 11 Mar 2021 14:31:11 +0000 (14:31 +0000)
committerDavid Sterba <dsterba@suse.com>
Mon, 19 Apr 2021 15:25:17 +0000 (17:25 +0200)
commit8656f19eafaa203b2eda4ab3f4c9074a600efd2f
treea5b6595ddc9729328e1b0f1ae4941462597f9f5e
parent62f44a5a1b7165154e92c34f0523c1aaa149a569
btrfs: remove unnecessary leaf check at btrfs_tree_mod_log_free_eb()

At btrfs_tree_mod_log_free_eb() we check if we are dealing with a leaf,
and if so, return immediately and do nothing. However this check can be
removed, because after it we call tree_mod_need_log(), which returns
false when given an extent buffer that corresponds to a leaf.

So just remove the leaf check and pass the extent buffer to
tree_mod_need_log().

Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/tree-mod-log.c