btrfs: change BUG_ON to assertion in tree_move_down()
[ Upstream commit 56f335e043 ]
There's only one caller of tree_move_down() that does not pass level 0
so the assertion is better suited here.
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
427d7cb3a9
commit
dc323a57cd
+1
-1
@@ -6882,8 +6882,8 @@ static int tree_move_down(struct btrfs_path *path, int *level, u64 reada_min_gen
|
||||
u64 reada_done = 0;
|
||||
|
||||
lockdep_assert_held_read(&parent->fs_info->commit_root_sem);
|
||||
ASSERT(*level != 0);
|
||||
|
||||
BUG_ON(*level == 0);
|
||||
eb = btrfs_read_node_slot(parent, slot);
|
||||
if (IS_ERR(eb))
|
||||
return PTR_ERR(eb);
|
||||
|
||||
Reference in New Issue
Block a user