linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] f2fs: add overflow/underflow checks to update_sit_entry— please ignore
@ 2025-12-04  7:05 yao xiao
  0 siblings, 0 replies; only message in thread
From: yao xiao @ 2025-12-04  7:05 UTC (permalink / raw)
  To: Jaegeuk Kim, Chao Yu; +Cc: linux-f2fs-devel, linux-fsdevel, linux-kernel

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-12-04  7:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-04  7:05 [PATCH v2] f2fs: add overflow/underflow checks to update_sit_entry— please ignore yao xiao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).