diff options
author | Filipe Manana <fdmanana@suse.com> | 2021-03-11 14:31:11 +0000 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2021-04-19 17:25:17 +0200 |
commit | ffe1d039d7ad4ffe53b110065c1c67dca0b9bfb6 (patch) | |
tree | a5b6595ddc9729328e1b0f1ae4941462597f9f5e /fs/btrfs | |
parent | 888dd183390d733734c855e2fa97103762c737c9 (diff) |
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>
Diffstat (limited to 'fs/btrfs')
-rw-r--r-- | fs/btrfs/tree-mod-log.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/btrfs/tree-mod-log.c b/fs/btrfs/tree-mod-log.c index 5145ee967125..b10170e691d1 100644 --- a/fs/btrfs/tree-mod-log.c +++ b/fs/btrfs/tree-mod-log.c @@ -554,10 +554,7 @@ int btrfs_tree_mod_log_free_eb(struct extent_buffer *eb) int i; int ret = 0; - if (btrfs_header_level(eb) == 0) - return 0; - - if (!tree_mod_need_log(eb->fs_info, NULL)) + if (!tree_mod_need_log(eb->fs_info, eb)) return 0; nritems = btrfs_header_nritems(eb); |