linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: yao xiao <xiangyaof4free@gmail.com>
To: Jaegeuk Kim <jaegeuk@kernel.org>, Chao Yu <chao@kernel.org>
Cc: linux-f2fs-devel@lists.sourceforge.net,
	linux-fsdevel@vger.kernel.org,  linux-kernel@vger.kernel.org
Subject: [PATCH v2] f2fs: add overflow/underflow checks to update_sit_entry— please ignore
Date: Thu, 4 Dec 2025 15:05:14 +0800	[thread overview]
Message-ID: <CACpam_YTgPkbgh_hHohOmRebJP-J+c8_GKFv6shChddTNk_iDQ@mail.gmail.com> (raw)

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

                 reply	other threads:[~2025-12-04  7:05 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CACpam_YTgPkbgh_hHohOmRebJP-J+c8_GKFv6shChddTNk_iDQ@mail.gmail.com \
    --to=xiangyaof4free@gmail.com \
    --cc=chao@kernel.org \
    --cc=jaegeuk@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).