This is a note to let you know that I've just added the patch titled btrfs: change BUG_ON to assertion in tree_move_down() to the 5.15-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: btrfs-change-bug_on-to-assertion-in-tree_move_down.patch and it can be found in the queue-5.15 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit 19b7f68b3d5bd999ef91d57b449a9416d46b42a8 Author: David Sterba <dsterba@xxxxxxxx> Date: Tue Feb 6 23:06:46 2024 +0100 btrfs: change BUG_ON to assertion in tree_move_down() [ 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@xxxxxxxx> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c index 27a33dfa93212..577980b33aeb7 100644 --- a/fs/btrfs/send.c +++ b/fs/btrfs/send.c @@ -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);