diff options
| author | Qu Wenruo <[email protected]> | 2024-08-30 07:05:48 +0000 |
|---|---|---|
| committer | David Sterba <[email protected]> | 2024-09-10 14:51:18 +0000 |
| commit | 77b0b98bb743f5d04d8f995ba1936e1143689d4a (patch) | |
| tree | 0aa22c2f50192c0378faf19640247b7fdb45ae03 /fs/btrfs/compression.c | |
| parent | btrfs: reduce chunk_map lookups in btrfs_map_block() (diff) | |
| download | kernel-77b0b98bb743f5d04d8f995ba1936e1143689d4a.tar.gz kernel-77b0b98bb743f5d04d8f995ba1936e1143689d4a.zip | |
btrfs: subpage: fix the bitmap dump which can cause bitmap corruption
In commit 75258f20fb70 ("btrfs: subpage: dump extra subpage bitmaps for
debug") an internal macro GET_SUBPAGE_BITMAP() is introduced to grab the
bitmap of each attribute.
But that commit is using bitmap_cut() which will do the left shift of
the larger bitmap, causing incorrect values.
Thankfully this bitmap_cut() is only called for debug usage, and so far
it's not yet causing problem.
Fix it to use bitmap_read() to only grab the desired sub-bitmap.
Fixes: 75258f20fb70 ("btrfs: subpage: dump extra subpage bitmaps for debug")
CC: [email protected] # 6.6+
Signed-off-by: Qu Wenruo <[email protected]>
Reviewed-by: David Sterba <[email protected]>
Signed-off-by: David Sterba <[email protected]>
Diffstat (limited to 'fs/btrfs/compression.c')
0 files changed, 0 insertions, 0 deletions
