diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c index cfbd3ab67911..cc57a97860d8 100644 --- a/fs/btrfs/send.c +++ b/fs/btrfs/send.c @@ -7185,8 +7185,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);