]> 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)
commit08d440159855e0d4ae35b1c3b834ea6f4e488d66
treea5b6595ddc9729328e1b0f1ae4941462597f9f5e
parent9b60e20eabe237d6d124ba0d2b6eb60f4522c4bf
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