aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/patch-kernel
diff options
context:
space:
mode:
authorQu Wenruo <[email protected]>2025-07-20 05:31:39 +0000
committerDavid Sterba <[email protected]>2025-08-07 15:07:15 +0000
commitdeaf895212da74635a7f0a420e1ecf8f5eca1fe5 (patch)
tree08f08110103086cfa3885acf0d8e3fff9ba25078 /scripts/patch-kernel
parentbtrfs: make btrfs_cleanup_ordered_extents() support large folios (diff)
downloadkernel-deaf895212da74635a7f0a420e1ecf8f5eca1fe5.tar.gz
kernel-deaf895212da74635a7f0a420e1ecf8f5eca1fe5.zip
btrfs: fix wrong length parameter for btrfs_cleanup_ordered_extents()
Inside nocow_one_range(), if the checksum cloning for data reloc inode failed, we call btrfs_cleanup_ordered_extents() to cleanup the just allocated ordered extents. But unlike extent_clear_unlock_delalloc(), btrfs_cleanup_ordered_extents() requires a length, not an inclusive end bytenr. This can be problematic, as the @end is normally way larger than @len. This means btrfs_cleanup_ordered_extents() can be called on folios out of the correct range, and if the out-of-range folio is under writeback, we can incorrectly clear the ordered flag of the folio, and trigger the DEBUG_WARN() inside btrfs_writepage_cow_fixup(). Fix the wrong parameter with correct length instead. Fixes: 94f6c5c17e52 ("btrfs: move ordered extent cleanup to where they are allocated") CC: [email protected] # 6.15+ Reviewed-by: Boris Burkov <[email protected]> Signed-off-by: Qu Wenruo <[email protected]> Reviewed-by: David Sterba <[email protected]> Signed-off-by: David Sterba <[email protected]>
Diffstat (limited to 'scripts/patch-kernel')
0 files changed, 0 insertions, 0 deletions