Patch "btrfs: scrub: initialize ret in scrub_simple_mirror() to fix compilation warning" 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: scrub: initialize ret in scrub_simple_mirror() to fix compilation warning

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-scrub-initialize-ret-in-scrub_simple_mirror-to.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 fcc4c36ecf96b28edfdac0c840b2d9fadae99c06
Author: Lu Yao <yaolu@xxxxxxxxxx>
Date:   Tue May 7 10:34:17 2024 +0800

    btrfs: scrub: initialize ret in scrub_simple_mirror() to fix compilation warning
    
    [ Upstream commit b4e585fffc1cf877112ed231a91f089e85688c2a ]
    
    The following error message is displayed:
      ../fs/btrfs/scrub.c:2152:9: error: ‘ret’ may be used uninitialized
      in this function [-Werror=maybe-uninitialized]"
    
    Compiler version: gcc version: (Debian 10.2.1-6) 10.2.1 20210110
    
    Reviewed-by: Boris Burkov <boris@xxxxxx>
    Signed-off-by: Lu Yao <yaolu@xxxxxxxxxx>
    Reviewed-by: David Sterba <dsterba@xxxxxxxx>
    Signed-off-by: David Sterba <dsterba@xxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c
index 12a2b1e3f1e35..f48895a9b165e 100644
--- a/fs/btrfs/scrub.c
+++ b/fs/btrfs/scrub.c
@@ -3407,7 +3407,7 @@ static int scrub_simple_mirror(struct scrub_ctx *sctx,
 	const u32 max_length = SZ_64K;
 	struct btrfs_path path = { 0 };
 	u64 cur_logical = logical_start;
-	int ret;
+	int ret = 0;
 
 	/* The range must be inside the bg */
 	ASSERT(logical_start >= bg->start && logical_end <= bg->start + bg->length);




[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