All of lore.kernel.org
 help / color / mirror / Atom feed
From: cem@kernel.org
To: cem@kernel.org
Cc: linux-xfs@vger.kernel.org, hch@lst.de
Subject: [PATCH] xfs: remove redundant extra assert from xfs_zone_gc_query
Date: Mon,  9 Nov 2026 11:25:01 +0100	[thread overview]
Message-ID: <20261109102507.262283-1-cem@kernel.org> (raw)

From: Carlos Maiolino <cem@kernel.org>

We initially assert that iter->next_startblock is lower or equal
than the total blocks in the rtg.  If we are in the later case
(next_startblock being equal to blocks in rtg) the conditional
right after the first assert, will jump out of the function.
After the conditional, the only remaining case is next_startblock
being lower than the rtg block count.  So the second assert seems
redundant to me.

Signed-off-by: Carlos Maiolino <cem@kernel.org>
---
 fs/xfs/xfs_zone_gc.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/fs/xfs/xfs_zone_gc.c b/fs/xfs/xfs_zone_gc.c
index cea5447a886d..00644d997963 100644
--- a/fs/xfs/xfs_zone_gc.c
+++ b/fs/xfs/xfs_zone_gc.c
@@ -337,7 +337,6 @@ xfs_zone_gc_query(
 	if (iter->next_startblock == rtg_blocks(rtg))
 		goto done;
 
-	ASSERT(iter->next_startblock < rtg_blocks(rtg));
 	ri_low.rm_startblock = iter->next_startblock;
 	memset(&ri_high, 0xFF, sizeof(ri_high));
 
-- 
2.56.0


             reply	other threads:[~2026-11-09 10:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-09 10:25 cem [this message]
2026-11-11 15:10 ` [PATCH] xfs: remove redundant extra assert from xfs_zone_gc_query Christoph Hellwig

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=20261109102507.262283-1-cem@kernel.org \
    --to=cem@kernel.org \
    --cc=hch@lst.de \
    --cc=linux-xfs@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.