mirror of
https://github.com/torvalds/linux.git
synced 2024-11-16 00:52:01 +00:00
Btrfs: remove unnecessary level check in balance_level
In the callchain: btrfs_search_slot() if (level != 0) setup_nodes_for_search() balance_level() It is just impossible to have level=0 in balance_level, we can drop the check. Signed-off-by: Liu Bo <bo.liu@linux.alibaba.com> Reviewed-by: Nikolay Borisov <nborisov@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
3cf5068f3d
commit
98e6b1eb40
@ -1815,8 +1815,7 @@ static noinline int balance_level(struct btrfs_trans_handle *trans,
|
||||
int orig_slot = path->slots[level];
|
||||
u64 orig_ptr;
|
||||
|
||||
if (level == 0)
|
||||
return 0;
|
||||
ASSERT(level > 0);
|
||||
|
||||
mid = path->nodes[level];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user