Patch "btrfs: reflink: initialize return value to 0 in btrfs_extent_same()" has been added to the 5.14-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: reflink: initialize return value to 0 in btrfs_extent_same()

to the 5.14-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-reflink-initialize-return-value-to-0-in-btrfs_.patch
and it can be found in the queue-5.14 subdirectory.

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



commit 313ca18df406792deb2b4d3b79560092bd88b911
Author: Sidong Yang <realwakka@xxxxxxxxx>
Date:   Thu Aug 26 14:44:36 2021 +0000

    btrfs: reflink: initialize return value to 0 in btrfs_extent_same()
    
    [ Upstream commit 44bee215f72f13874c0e734a0712c2e3264c0108 ]
    
    Fix a warning reported by smatch that ret could be returned without
    initialized.  The dedupe operations are supposed to to return 0 for a 0
    length range but the caller does not pass olen == 0. To keep this
    behaviour and also fix the warning initialize ret to 0.
    
    Reviewed-by: Filipe Manana <fdmanana@xxxxxxxx>
    Signed-off-by: Sidong Yang <realwakka@xxxxxxxxx>
    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/reflink.c b/fs/btrfs/reflink.c
index 9b0814318e726..c71e49782e86d 100644
--- a/fs/btrfs/reflink.c
+++ b/fs/btrfs/reflink.c
@@ -649,7 +649,7 @@ static int btrfs_extent_same_range(struct inode *src, u64 loff, u64 len,
 static int btrfs_extent_same(struct inode *src, u64 loff, u64 olen,
 			     struct inode *dst, u64 dst_loff)
 {
-	int ret;
+	int ret = 0;
 	u64 i, tail_len, chunk_count;
 	struct btrfs_root *root_dst = BTRFS_I(dst)->root;
 



[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