aboutsummaryrefslogtreecommitdiffstats
path: root/rust/helpers/helpers.c
diff options
context:
space:
mode:
authorQu Wenruo <[email protected]>2025-04-01 07:50:28 +0000
committerDavid Sterba <[email protected]>2025-04-17 09:55:56 +0000
commit7d82240c457fc15abdf7dedf15104cea774b005b (patch)
tree9195d53179064d68b0af20472a246c602ef436d3 /rust/helpers/helpers.c
parentbtrfs: avoid page_lockend underflow in btrfs_punch_hole_lock_range() (diff)
downloadkernel-7d82240c457fc15abdf7dedf15104cea774b005b.tar.gz
kernel-7d82240c457fc15abdf7dedf15104cea774b005b.zip
btrfs: fix the ASSERT() inside GET_SUBPAGE_BITMAP()
After enabling large data folios for tests, I hit the ASSERT() inside GET_SUBPAGE_BITMAP() where blocks_per_folio matches BITS_PER_LONG. The ASSERT() itself is only based on the original subpage fs block size, where we have at most 16 blocks per page, thus "ASSERT(blocks_per_folio < BITS_PER_LONG)". However the experimental large data folio support will set the max folio order according to the BITS_PER_LONG, so we can have a case where a large folio contains exactly BITS_PER_LONG blocks. So the ASSERT() is too strict, change it to "ASSERT(blocks_per_folio <= BITS_PER_LONG)" to avoid the false alert. Reviewed-by: Filipe Manana <[email protected]> Reviewed-by: Sweet Tea Dorminy <[email protected]> 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 'rust/helpers/helpers.c')
0 files changed, 0 insertions, 0 deletions