Linux XFS filesystem development
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@redhat.com>
To: linux-xfs@vger.kernel.org
Cc: Eric Sandeen <sandeen@redhat.com>
Subject: [PATCH V2 13/14] xfs: remove unused mp argument from xfs_verify_fileoff()
Date: Mon, 14 Sep 2026 17:28:59 -0500	[thread overview]
Message-ID: <20260914223007.1587017-14-sandeen@redhat.com> (raw)
In-Reply-To: <20260914223007.1587017-1-sandeen@redhat.com>

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
 fs/xfs/libxfs/xfs_types.c   | 5 ++---
 fs/xfs/libxfs/xfs_types.h   | 2 +-
 fs/xfs/scrub/inode_repair.c | 2 +-
 fs/xfs/scrub/quota.c        | 2 +-
 fs/xfs/scrub/quota_repair.c | 4 ++--
 fs/xfs/xfs_inode.c          | 2 +-
 fs/xfs/xfs_super.c          | 2 +-
 7 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/fs/xfs/libxfs/xfs_types.c b/fs/xfs/libxfs/xfs_types.c
index b5b0b6334d11..32e6c0aaf467 100644
--- a/fs/xfs/libxfs/xfs_types.c
+++ b/fs/xfs/libxfs/xfs_types.c
@@ -232,7 +232,6 @@ xfs_verify_dablk(
 /* Check that a file block offset does not exceed the maximum. */
 bool
 xfs_verify_fileoff(
-	struct xfs_mount	*mp,
 	xfs_fileoff_t		off)
 {
 	return off <= XFS_MAX_FILEOFF;
@@ -248,8 +247,8 @@ xfs_verify_fileext(
 	if (off + len <= off)
 		return false;
 
-	if (!xfs_verify_fileoff(mp, off))
+	if (!xfs_verify_fileoff(off))
 		return false;
 
-	return xfs_verify_fileoff(mp, off + len - 1);
+	return xfs_verify_fileoff(off + len - 1);
 }
diff --git a/fs/xfs/libxfs/xfs_types.h b/fs/xfs/libxfs/xfs_types.h
index d217220d2054..adae81149680 100644
--- a/fs/xfs/libxfs/xfs_types.h
+++ b/fs/xfs/libxfs/xfs_types.h
@@ -280,7 +280,7 @@ bool xfs_verify_icount(struct xfs_mount *mp, unsigned long long icount);
 bool xfs_verify_dablk(xfs_fileoff_t off);
 void xfs_icount_range(struct xfs_mount *mp, unsigned long long *min,
 		unsigned long long *max);
-bool xfs_verify_fileoff(struct xfs_mount *mp, xfs_fileoff_t off);
+bool xfs_verify_fileoff(xfs_fileoff_t off);
 bool xfs_verify_fileext(struct xfs_mount *mp, xfs_fileoff_t off,
 		xfs_fileoff_t len);
 
diff --git a/fs/xfs/scrub/inode_repair.c b/fs/xfs/scrub/inode_repair.c
index cdfde3cea5fb..e12525838e6c 100644
--- a/fs/xfs/scrub/inode_repair.c
+++ b/fs/xfs/scrub/inode_repair.c
@@ -933,7 +933,7 @@ xrep_dinode_bad_bmbt_fork(
 
 		fkp = xfs_bmdr_key_addr(dfp, i);
 		fileoff = be64_to_cpu(fkp->br_startoff);
-		if (!xfs_verify_fileoff(sc->mp, fileoff))
+		if (!xfs_verify_fileoff(fileoff))
 			return true;
 
 		fpp = xfs_bmdr_ptr_addr(dfp, i, dmxr);
diff --git a/fs/xfs/scrub/quota.c b/fs/xfs/scrub/quota.c
index 222812fe202c..8c6ba1240fd5 100644
--- a/fs/xfs/scrub/quota.c
+++ b/fs/xfs/scrub/quota.c
@@ -89,7 +89,7 @@ xchk_quota_item_bmap(
 	int			nmaps = 1;
 	int			error;
 
-	if (!xfs_verify_fileoff(mp, offset)) {
+	if (!xfs_verify_fileoff(offset)) {
 		xchk_fblock_set_corrupt(sc, XFS_DATA_FORK, offset);
 		return 0;
 	}
diff --git a/fs/xfs/scrub/quota_repair.c b/fs/xfs/scrub/quota_repair.c
index 59302e8afc7e..9ab373c1994c 100644
--- a/fs/xfs/scrub/quota_repair.c
+++ b/fs/xfs/scrub/quota_repair.c
@@ -116,8 +116,8 @@ xrep_quota_item_bmap(
 	int			error;
 
 	/* The computed file offset should always be valid. */
-	if (!xfs_verify_fileoff(mp, offset)) {
-		ASSERT(xfs_verify_fileoff(mp, offset));
+	if (!xfs_verify_fileoff(offset)) {
+		ASSERT(xfs_verify_fileoff(offset));
 		return -EFSCORRUPTED;
 	}
 	dq->q_fileoffset = offset;
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c
index 64643fb8b591..842627af4061 100644
--- a/fs/xfs/xfs_inode.c
+++ b/fs/xfs/xfs_inode.c
@@ -1064,7 +1064,7 @@ xfs_itruncate_extents_flags(
 	 * the page cache can't scale that far.
 	 */
 	first_unmap_block = XFS_B_TO_FSB(mp, (xfs_ufsize_t)new_size);
-	if (!xfs_verify_fileoff(mp, first_unmap_block)) {
+	if (!xfs_verify_fileoff(first_unmap_block)) {
 		WARN_ON_ONCE(first_unmap_block > XFS_MAX_FILEOFF);
 		return 0;
 	}
diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
index b24db75eaedc..2edc2a497883 100644
--- a/fs/xfs/xfs_super.c
+++ b/fs/xfs/xfs_super.c
@@ -1889,7 +1889,7 @@ xfs_fs_fill_super(
 	 * Avoid integer overflow by comparing the maximum bmbt offset to the
 	 * maximum pagecache offset in units of fs blocks.
 	 */
-	if (!xfs_verify_fileoff(mp, XFS_B_TO_FSBT(mp, MAX_LFS_FILESIZE))) {
+	if (!xfs_verify_fileoff(XFS_B_TO_FSBT(mp, MAX_LFS_FILESIZE))) {
 		xfs_warn(mp,
 "MAX_LFS_FILESIZE block offset (%llu) exceeds extent map maximum (%llu)!",
 			 XFS_B_TO_FSBT(mp, MAX_LFS_FILESIZE),
-- 
2.55.0


  parent reply	other threads:[~2026-09-14 22:30 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-14 22:28 [PATCH V2 0/14] xfs: remove unused arguments from many functions Eric Sandeen
2026-09-14 22:28 ` [PATCH V2 01/14] xfs: remove unused args argument from xfs_attr_node_lookup() Eric Sandeen
2026-09-14 22:28 ` [PATCH V2 02/14] xfs: remove unused rsvd argument from xfs_bmap_add_attrfork() Eric Sandeen
2026-09-14 22:28 ` [PATCH V2 03/14] xfs: remove unused mp and ops arguments from xfbtree_rec_bytes() Eric Sandeen
2026-09-14 22:28 ` [PATCH V2 04/14] xfs: remove unused mp argument from xfs_exchmaps_check_forks() Eric Sandeen
2026-09-14 22:28 ` [PATCH V2 05/14] xfs: remove unused mp argument from xfs_inobt_rec_check_count() Eric Sandeen
2026-09-14 22:28 ` [PATCH V2 06/14] xfs: remove unused mp argument from xfs_parent_finish() Eric Sandeen
2026-09-14 22:28 ` [PATCH V2 07/14] xfs: remove unused tp argument from xfs_rmap_update_hook() Eric Sandeen
2026-09-14 22:28 ` [PATCH V2 08/14] xfs: remove unused mp argument from xfs_rtrefcount_broot_space_calc() Eric Sandeen
2026-09-14 22:28 ` [PATCH V2 09/14] xfs: remove unused mp argument from xfs_rtrefcount_broot_space() Eric Sandeen
2026-09-14 22:28 ` [PATCH V2 10/14] xfs: remove unused mp argument from xfs_rtrmap_broot_space_calc() Eric Sandeen
2026-09-14 22:28 ` [PATCH V2 11/14] xfs: remove unused mp argument from xfs_calc_default_atomic_ioend_reservation() Eric Sandeen
2026-09-14 22:28 ` [PATCH V2 12/14] xfs: remove unused mp argument from xfs_verify_dablk() Eric Sandeen
2026-09-14 22:28 ` Eric Sandeen [this message]
2026-09-14 22:29 ` [PATCH V2 14/14] xfs: remove unused mp argument from xfs_verify_fileext() Eric Sandeen
2026-09-14 22:44 ` [PATCH V2 0/14] xfs: remove unused arguments from many functions Darrick J. Wong
2026-09-15  6:34 ` Christoph Hellwig
2026-09-16 13:16 ` Carlos Maiolino
2026-09-17 11:05 ` Carlos Maiolino

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=20260914223007.1587017-14-sandeen@redhat.com \
    --to=sandeen@redhat.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox