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 6.6-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-6.6 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit 0b423aba6ffb2eb95f03c251f42f9ceb48589383 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 9da3c72eb6153..163f36eb7491a 100644 --- a/fs/btrfs/send.c +++ b/fs/btrfs/send.c @@ -7448,8 +7448,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);