summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/send.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2024-02-06 23:06:46 +0100
committerDavid Sterba <dsterba@suse.com>2024-03-04 16:24:51 +0100
commit56f335e043ae73c32dbb70ba95488845dc0f1e6e (patch)
treec8da762747e980e8deb4d067a9e48b7821f50b6d /fs/btrfs/send.c
parent3c6ee34c6f9cd12802326da26631232a61743501 (diff)
downloadlinux-stable-56f335e043ae73c32dbb70ba95488845dc0f1e6e.tar.gz
linux-stable-56f335e043ae73c32dbb70ba95488845dc0f1e6e.tar.bz2
linux-stable-56f335e043ae73c32dbb70ba95488845dc0f1e6e.zip
btrfs: change BUG_ON to assertion in tree_move_down()
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>
Diffstat (limited to 'fs/btrfs/send.c')
-rw-r--r--fs/btrfs/send.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c
index 5b7ec4f99aad..dc18d5624ec7 100644
--- a/fs/btrfs/send.c
+++ b/fs/btrfs/send.c
@@ -7447,8 +7447,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);