[PATCH v2] f2fs: add overflow/underflow checks to update_sit_entry— please ignore
From: yao xiao
Date: Thu Dec 04 2025 - 02:05:28 EST
Hi,
After re-examining the update_sit_entry() logic and its callers,
I realized that my assumption in the v2 patch was incorrect.
The value of del is strictly bounded in all valid call paths
(either ±1 or -blocks_per_seg), and valid_blocks is already limited
by f2fs_usable_blks_in_seg().
Therefore the arithmetic cannot overflow before the existing
f2fs_bug_on() range check is executed.
As a result, the overflow/underflow checks introduced in my patch are
unnecessary.
Please ignore this patch.
Sorry for the noise, and thank you for your time.
Best regards,
Yao Xiao