Skip to content

Commit c8df8d8

Browse files
kdavemehmetb0
authored andcommitted
btrfs: change BUG_ON to assertion in tree_move_down()
BugLink: https://bugs.launchpad.net/bugs/2084005 [ Upstream commit 56f335e043ae73c32dbb70ba95488845dc0f1e6e ] 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> Signed-off-by: Koichiro Den <koichiro.den@canonical.com> Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
1 parent 96af5cc commit c8df8d8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/btrfs/send.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7448,8 +7448,8 @@ static int tree_move_down(struct btrfs_path *path, int *level, u64 reada_min_gen
74487448
u64 reada_done = 0;
74497449

74507450
lockdep_assert_held_read(&parent->fs_info->commit_root_sem);
7451+
ASSERT(*level != 0);
74517452

7452-
BUG_ON(*level == 0);
74537453
eb = btrfs_read_node_slot(parent, slot);
74547454
if (IS_ERR(eb))
74557455
return PTR_ERR(eb);

0 commit comments

Comments
 (0)