Patch "btrfs: fix range_end calculation in extent_write_locked_range" has been added to the 6.4-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: fix range_end calculation in extent_write_locked_range

to the 6.4-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-fix-range_end-calculation-in-extent_write_lock.patch
and it can be found in the queue-6.4 subdirectory.

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



commit 67644565dd202bc90e9c91375fe5e3249a986f56
Author: Christoph Hellwig <hch@xxxxxx>
Date:   Wed May 31 08:04:50 2023 +0200

    btrfs: fix range_end calculation in extent_write_locked_range
    
    [ Upstream commit 36614a3beba33a05ad78d4dcb9aa1d00e8a7d01f ]
    
    The range_end field in struct writeback_control is inclusive, just like
    the end parameter passed to extent_write_locked_range.  Not doing this
    could cause extra writeout, which is harmless but suboptimal.
    
    Fixes: 771ed689d2cd ("Btrfs: Optimize compressed writeback and reads")
    CC: stable@xxxxxxxxxxxxxxx # 5.9+
    Reviewed-by: Josef Bacik <josef@xxxxxxxxxxxxxx>
    Signed-off-by: Christoph Hellwig <hch@xxxxxx>
    Reviewed-by: David Sterba <dsterba@xxxxxxxx>
    Signed-off-by: David Sterba <dsterba@xxxxxxxx>
    Stable-dep-of: 7027f87108ce ("btrfs: don't treat zoned writeback as being from an async helper thread")
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index 0c9538bb3c852..ac3aae55d55e5 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -2468,7 +2468,7 @@ int extent_write_locked_range(struct inode *inode, u64 start, u64 end)
 	struct writeback_control wbc_writepages = {
 		.sync_mode	= WB_SYNC_ALL,
 		.range_start	= start,
-		.range_end	= end + 1,
+		.range_end	= end,
 		.no_cgroup_owner = 1,
 	};
 	struct btrfs_bio_ctrl bio_ctrl = {



[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