aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c
diff options
context:
space:
mode:
authorZhang Yi <[email protected]>2025-02-17 06:59:55 +0000
committerTheodore Ts'o <[email protected]>2025-03-18 04:15:25 +0000
commit18aba2adb3e2a676fff0d81e51f5045f3c636666 (patch)
tree96a617fef375252735424cc3ee6146d7c81832d1 /drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c
parentext4: remove references to bh->b_page (diff)
downloadkernel-18aba2adb3e2a676fff0d81e51f5045f3c636666.tar.gz
kernel-18aba2adb3e2a676fff0d81e51f5045f3c636666.zip
jbd2: fix off-by-one while erasing journal
In __jbd2_journal_erase(), the block_stop parameter includes the last block of a contiguous region; however, the calculation of byte_stop is incorrect, as it does not account for the bytes in that last block. Consequently, the page cache is not cleared properly, which occasionally causes the ext4/050 test to fail. Since block_stop operates on inclusion semantics, it involves repeated increments and decrements by 1, significantly increasing the complexity of the calculations. Optimize the calculation and fix the incorrect byte_stop by make both block_stop and byte_stop to use exclusion semantics. This fixes a failure in fstests ext4/050. Fixes: 01d5d96542fd ("ext4: add discard/zeroout flags to journal flush") Signed-off-by: Zhang Yi <[email protected]> Reviewed-by: Baokun Li <[email protected]> Reviewed-by: Jan Kara <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Theodore Ts'o <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c')
0 files changed, 0 insertions, 0 deletions