Patch "btrfs: change BUG_ON to assertion in tree_move_down()" has been added to the 6.1-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.1-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.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 05914d267c52e9be91e1ab2653508fd0ca9e460d
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 cfbd3ab679117..cc57a97860d8a 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);




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux