* [PATCH 0/14] xfs: remove unused arguments from many functions
@ 2026-09-14 20:46 Eric Sandeen
2026-09-14 20:46 ` [PATCH 01/14] xfs: remove unused args argument from xfs_attr_node_lookup() Eric Sandeen
` (13 more replies)
0 siblings, 14 replies; 15+ messages in thread
From: Eric Sandeen @ 2026-09-14 20:46 UTC (permalink / raw)
To: linux-xfs
Seems it's cleanup season lately on the list, so figured I'd play
too.
This removes unused arguments (mostly mp) from a bunch of functions.
I did a quick check of the xfsprogs port, and it should be fine.
(Left out xfs_rmapbt_maxrecs changes for that reason; all the
.maxrecs functions in xfs_db need to match.)
Assisted-by: gcc version 15.3.1 20260722 (Red Hat 15.3.1-1) (GCC)
Total diffstat:
$ git diff 654ae5d73c05.. | diffstat
libxfs/xfs_attr.c | 14 ++++++--------
libxfs/xfs_bmap.c | 5 ++---
libxfs/xfs_bmap.h | 2 +-
libxfs/xfs_btree_mem.c | 6 ++----
libxfs/xfs_exchmaps.c | 1 -
libxfs/xfs_exchmaps.h | 3 +--
libxfs/xfs_ialloc.c | 2 +-
libxfs/xfs_ialloc_btree.c | 1 -
libxfs/xfs_ialloc_btree.h | 5 ++---
libxfs/xfs_metadir.c | 2 +-
libxfs/xfs_parent.h | 1 -
libxfs/xfs_rmap.c | 13 ++++++-------
libxfs/xfs_rtrefcount_btree.c | 8 ++++----
libxfs/xfs_rtrefcount_btree.h | 5 ++---
libxfs/xfs_rtrmap_btree.c | 6 +++---
libxfs/xfs_rtrmap_btree.h | 3 +--
libxfs/xfs_trans_resv.c | 7 +++----
libxfs/xfs_types.c | 7 ++-----
libxfs/xfs_types.h | 7 +++----
scrub/bmap.c | 9 ++++-----
scrub/bmap_repair.c | 4 ++--
scrub/inode_repair.c | 6 +++---
scrub/orphanage.c | 2 +-
scrub/quota.c | 2 +-
scrub/quota_repair.c | 4 ++--
scrub/rtrefcount_repair.c | 3 +--
scrub/rtrmap_repair.c | 2 +-
xfs_bmap_item.c | 2 +-
xfs_exchmaps_item.c | 4 ++--
xfs_exchrange.c | 2 +-
xfs_inode.c | 20 ++++++++++----------
xfs_rmap_item.c | 2 +-
xfs_super.c | 2 +-
xfs_symlink.c | 4 ++--
34 files changed, 73 insertions(+), 93 deletions(-)
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH 01/14] xfs: remove unused args argument from xfs_attr_node_lookup()
2026-09-14 20:46 [PATCH 0/14] xfs: remove unused arguments from many functions Eric Sandeen
@ 2026-09-14 20:46 ` Eric Sandeen
2026-09-14 20:46 ` [PATCH 02/14] xfs: remove unused rsvd argument from xfs_bmap_add_attrfork() Eric Sandeen
` (12 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: Eric Sandeen @ 2026-09-14 20:46 UTC (permalink / raw)
To: linux-xfs; +Cc: Eric Sandeen
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
fs/xfs/libxfs/xfs_attr.c | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
diff --git a/fs/xfs/libxfs/xfs_attr.c b/fs/xfs/libxfs/xfs_attr.c
index b3f7b2c34ad7..8fb3adc3dd2d 100644
--- a/fs/xfs/libxfs/xfs_attr.c
+++ b/fs/xfs/libxfs/xfs_attr.c
@@ -59,8 +59,7 @@ STATIC void xfs_attr_restore_rmt_blk(struct xfs_da_args *args);
static int xfs_attr_node_try_addname(struct xfs_attr_intent *attr);
STATIC int xfs_attr_node_addname_find_attr(struct xfs_attr_intent *attr);
STATIC int xfs_attr_node_remove_attr(struct xfs_attr_intent *attr);
-STATIC int xfs_attr_node_lookup(struct xfs_da_args *args,
- struct xfs_da_state *state);
+STATIC int xfs_attr_node_lookup(struct xfs_da_state *state);
int
xfs_inode_hasattr(
@@ -709,7 +708,7 @@ int xfs_attr_node_removename_setup(
int error;
xfs_attr_item_init_da_state(attr);
- error = xfs_attr_node_lookup(args, attr->xattri_da_state);
+ error = xfs_attr_node_lookup(attr->xattri_da_state);
if (error != -EEXIST)
goto out;
error = 0;
@@ -985,7 +984,7 @@ xfs_attr_lookup(
}
state = xfs_da_state_alloc(args);
- error = xfs_attr_node_lookup(args, state);
+ error = xfs_attr_node_lookup(state);
xfs_da_state_free(state);
return error;
}
@@ -1386,7 +1385,6 @@ xfs_attr_leaf_get(
/* Return EEXIST if attr is found, or ENOATTR if not. */
STATIC int
xfs_attr_node_lookup(
- struct xfs_da_args *args,
struct xfs_da_state *state)
{
int retval, error;
@@ -1417,7 +1415,7 @@ xfs_attr_node_addname_find_attr(
* to where it should go.
*/
xfs_attr_item_init_da_state(attr);
- error = xfs_attr_node_lookup(args, attr->xattri_da_state);
+ error = xfs_attr_node_lookup(attr->xattri_da_state);
switch (error) {
case -ENOATTR:
if (args->op_flags & XFS_DA_OP_REPLACE)
@@ -1588,7 +1586,7 @@ xfs_attr_node_get(
* Search to see if name exists, and get back a pointer to it.
*/
state = xfs_da_state_alloc(args);
- error = xfs_attr_node_lookup(args, state);
+ error = xfs_attr_node_lookup(state);
if (error != -EEXIST)
goto out_release;
--
2.55.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 02/14] xfs: remove unused rsvd argument from xfs_bmap_add_attrfork()
2026-09-14 20:46 [PATCH 0/14] xfs: remove unused arguments from many functions Eric Sandeen
2026-09-14 20:46 ` [PATCH 01/14] xfs: remove unused args argument from xfs_attr_node_lookup() Eric Sandeen
@ 2026-09-14 20:46 ` Eric Sandeen
2026-09-14 20:46 ` [PATCH 03/14] xfs: remove unused mp and ops arguments from xfbtree_rec_bytes() Eric Sandeen
` (11 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: Eric Sandeen @ 2026-09-14 20:46 UTC (permalink / raw)
To: linux-xfs; +Cc: Eric Sandeen
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
fs/xfs/libxfs/xfs_attr.c | 2 +-
fs/xfs/libxfs/xfs_bmap.c | 3 +--
fs/xfs/libxfs/xfs_bmap.h | 2 +-
fs/xfs/scrub/inode_repair.c | 2 +-
fs/xfs/scrub/orphanage.c | 2 +-
5 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/fs/xfs/libxfs/xfs_attr.c b/fs/xfs/libxfs/xfs_attr.c
index 8fb3adc3dd2d..c4bb59633ce8 100644
--- a/fs/xfs/libxfs/xfs_attr.c
+++ b/fs/xfs/libxfs/xfs_attr.c
@@ -1013,7 +1013,7 @@ xfs_attr_add_fork(
if (xfs_inode_has_attr_fork(ip))
goto trans_cancel;
- error = xfs_bmap_add_attrfork(tp, ip, size, rsvd);
+ error = xfs_bmap_add_attrfork(tp, ip, size);
if (error)
goto trans_cancel;
diff --git a/fs/xfs/libxfs/xfs_bmap.c b/fs/xfs/libxfs/xfs_bmap.c
index d64defeda645..ca147dfaed05 100644
--- a/fs/xfs/libxfs/xfs_bmap.c
+++ b/fs/xfs/libxfs/xfs_bmap.c
@@ -1026,8 +1026,7 @@ int /* error code */
xfs_bmap_add_attrfork(
struct xfs_trans *tp,
struct xfs_inode *ip, /* incore inode pointer */
- int size, /* space new attribute needs */
- int rsvd) /* xact may use reserved blks */
+ int size) /* space new attribute needs */
{
struct xfs_mount *mp = tp->t_mountp;
int logflags; /* logging flags */
diff --git a/fs/xfs/libxfs/xfs_bmap.h b/fs/xfs/libxfs/xfs_bmap.h
index d5f2729305fa..60f6df4ce057 100644
--- a/fs/xfs/libxfs/xfs_bmap.h
+++ b/fs/xfs/libxfs/xfs_bmap.h
@@ -181,7 +181,7 @@ void xfs_trim_extent(struct xfs_bmbt_irec *irec, xfs_fileoff_t bno,
xfs_filblks_t len);
unsigned int xfs_bmap_compute_attr_offset(struct xfs_mount *mp);
int xfs_bmap_add_attrfork(struct xfs_trans *tp, struct xfs_inode *ip,
- int size, int rsvd);
+ int size);
void xfs_bmap_local_to_extents_empty(struct xfs_trans *tp,
struct xfs_inode *ip, int whichfork);
int xfs_bmap_local_to_extents(struct xfs_trans *tp, struct xfs_inode *ip,
diff --git a/fs/xfs/scrub/inode_repair.c b/fs/xfs/scrub/inode_repair.c
index 8bc508336aa5..42e0d7a6c7fd 100644
--- a/fs/xfs/scrub/inode_repair.c
+++ b/fs/xfs/scrub/inode_repair.c
@@ -1949,7 +1949,7 @@ xrep_inode_pptr(
return 0;
return xfs_bmap_add_attrfork(sc->tp, ip,
- sizeof(struct xfs_attr_sf_hdr), true);
+ sizeof(struct xfs_attr_sf_hdr));
}
/* Fix COW extent size hint problems. */
diff --git a/fs/xfs/scrub/orphanage.c b/fs/xfs/scrub/orphanage.c
index 3aca66869b80..8c9f323201b4 100644
--- a/fs/xfs/scrub/orphanage.c
+++ b/fs/xfs/scrub/orphanage.c
@@ -546,7 +546,7 @@ xrep_adoption_move(
if (!xfs_inode_has_attr_fork(sc->ip) && xfs_has_parent(sc->mp)) {
int sf_size = xrep_adoption_attr_sizeof(adopt);
- error = xfs_bmap_add_attrfork(sc->tp, sc->ip, sf_size, true);
+ error = xfs_bmap_add_attrfork(sc->tp, sc->ip, sf_size);
if (error)
return error;
}
--
2.55.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 03/14] xfs: remove unused mp and ops arguments from xfbtree_rec_bytes()
2026-09-14 20:46 [PATCH 0/14] xfs: remove unused arguments from many functions Eric Sandeen
2026-09-14 20:46 ` [PATCH 01/14] xfs: remove unused args argument from xfs_attr_node_lookup() Eric Sandeen
2026-09-14 20:46 ` [PATCH 02/14] xfs: remove unused rsvd argument from xfs_bmap_add_attrfork() Eric Sandeen
@ 2026-09-14 20:46 ` Eric Sandeen
2026-09-14 20:46 ` [PATCH 04/14] xfs: remove unused mp argument from xfs_exchmaps_check_forks() Eric Sandeen
` (10 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: Eric Sandeen @ 2026-09-14 20:46 UTC (permalink / raw)
To: linux-xfs; +Cc: Eric Sandeen
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
fs/xfs/libxfs/xfs_btree_mem.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/fs/xfs/libxfs/xfs_btree_mem.c b/fs/xfs/libxfs/xfs_btree_mem.c
index 37136a70e56d..f5207c2e261e 100644
--- a/fs/xfs/libxfs/xfs_btree_mem.c
+++ b/fs/xfs/libxfs/xfs_btree_mem.c
@@ -73,9 +73,7 @@ xfbtree_destroy(
/* Compute the number of bytes available for records. */
static inline unsigned int
-xfbtree_rec_bytes(
- struct xfs_mount *mp,
- const struct xfs_btree_ops *ops)
+xfbtree_rec_bytes(void)
{
return XMBUF_BLOCKSIZE - XFS_BTREE_LBLOCK_CRC_LEN;
}
@@ -117,7 +115,7 @@ xfbtree_init(
struct xfs_buftarg *btp,
const struct xfs_btree_ops *ops)
{
- unsigned int blocklen = xfbtree_rec_bytes(mp, ops);
+ unsigned int blocklen = xfbtree_rec_bytes();
unsigned int keyptr_len;
int error;
--
2.55.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 04/14] xfs: remove unused mp argument from xfs_exchmaps_check_forks()
2026-09-14 20:46 [PATCH 0/14] xfs: remove unused arguments from many functions Eric Sandeen
` (2 preceding siblings ...)
2026-09-14 20:46 ` [PATCH 03/14] xfs: remove unused mp and ops arguments from xfbtree_rec_bytes() Eric Sandeen
@ 2026-09-14 20:46 ` Eric Sandeen
2026-09-14 20:46 ` [PATCH 05/14] xfs: remove unused mp argument from xfs_inobt_rec_check_count() Eric Sandeen
` (9 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: Eric Sandeen @ 2026-09-14 20:46 UTC (permalink / raw)
To: linux-xfs; +Cc: Eric Sandeen
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
fs/xfs/libxfs/xfs_exchmaps.c | 1 -
fs/xfs/libxfs/xfs_exchmaps.h | 3 +--
fs/xfs/xfs_exchrange.c | 2 +-
3 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/fs/xfs/libxfs/xfs_exchmaps.c b/fs/xfs/libxfs/xfs_exchmaps.c
index 3efed37cb98a..78f09e9da744 100644
--- a/fs/xfs/libxfs/xfs_exchmaps.c
+++ b/fs/xfs/libxfs/xfs_exchmaps.c
@@ -135,7 +135,6 @@ xmi_has_postop_work(const struct xfs_exchmaps_intent *xmi)
/* Check all mappings to make sure we can actually exchange them. */
int
xfs_exchmaps_check_forks(
- struct xfs_mount *mp,
const struct xfs_exchmaps_req *req)
{
struct xfs_ifork *ifp1, *ifp2;
diff --git a/fs/xfs/libxfs/xfs_exchmaps.h b/fs/xfs/libxfs/xfs_exchmaps.h
index fa822dff202a..055b8dbabd5b 100644
--- a/fs/xfs/libxfs/xfs_exchmaps.h
+++ b/fs/xfs/libxfs/xfs_exchmaps.h
@@ -115,8 +115,7 @@ void xfs_exchmaps_upgrade_extent_counts(struct xfs_trans *tp,
int xfs_exchmaps_finish_one(struct xfs_trans *tp,
struct xfs_exchmaps_intent *xmi);
-int xfs_exchmaps_check_forks(struct xfs_mount *mp,
- const struct xfs_exchmaps_req *req);
+int xfs_exchmaps_check_forks(const struct xfs_exchmaps_req *req);
void xfs_exchange_mappings(struct xfs_trans *tp,
const struct xfs_exchmaps_req *req);
diff --git a/fs/xfs/xfs_exchrange.c b/fs/xfs/xfs_exchrange.c
index 94965a6c2187..a3891e17fa87 100644
--- a/fs/xfs/xfs_exchrange.c
+++ b/fs/xfs/xfs_exchrange.c
@@ -238,7 +238,7 @@ xfs_exchrange_mappings(
trace_xfs_exchrange_before(ip2, 2);
trace_xfs_exchrange_before(ip1, 1);
- error = xfs_exchmaps_check_forks(mp, &req);
+ error = xfs_exchmaps_check_forks(&req);
if (error)
goto out_trans_cancel;
--
2.55.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 05/14] xfs: remove unused mp argument from xfs_inobt_rec_check_count()
2026-09-14 20:46 [PATCH 0/14] xfs: remove unused arguments from many functions Eric Sandeen
` (3 preceding siblings ...)
2026-09-14 20:46 ` [PATCH 04/14] xfs: remove unused mp argument from xfs_exchmaps_check_forks() Eric Sandeen
@ 2026-09-14 20:46 ` Eric Sandeen
2026-09-14 20:46 ` [PATCH 06/14] xfs: remove unused mp argument from xfs_parent_finish() Eric Sandeen
` (8 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: Eric Sandeen @ 2026-09-14 20:46 UTC (permalink / raw)
To: linux-xfs; +Cc: Eric Sandeen
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
fs/xfs/libxfs/xfs_ialloc.c | 2 +-
fs/xfs/libxfs/xfs_ialloc_btree.c | 1 -
fs/xfs/libxfs/xfs_ialloc_btree.h | 5 ++---
3 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/fs/xfs/libxfs/xfs_ialloc.c b/fs/xfs/libxfs/xfs_ialloc.c
index 58dac4d505ba..19b513b11692 100644
--- a/fs/xfs/libxfs/xfs_ialloc.c
+++ b/fs/xfs/libxfs/xfs_ialloc.c
@@ -615,7 +615,7 @@ xfs_inobt_insert_sprec(
trace_xfs_irec_merge_post(pag, nrec);
- error = xfs_inobt_rec_check_count(mp, nrec);
+ error = xfs_inobt_rec_check_count(nrec);
if (error)
goto error;
diff --git a/fs/xfs/libxfs/xfs_ialloc_btree.c b/fs/xfs/libxfs/xfs_ialloc_btree.c
index 1376e8630449..1f0bace2f144 100644
--- a/fs/xfs/libxfs/xfs_ialloc_btree.c
+++ b/fs/xfs/libxfs/xfs_ialloc_btree.c
@@ -687,7 +687,6 @@ xfs_inobt_irec_to_allocmask(
*/
int
xfs_inobt_rec_check_count(
- struct xfs_mount *mp,
struct xfs_inobt_rec_incore *rec)
{
int inocount = 0;
diff --git a/fs/xfs/libxfs/xfs_ialloc_btree.h b/fs/xfs/libxfs/xfs_ialloc_btree.h
index 300edf5bc009..e04c63c66f39 100644
--- a/fs/xfs/libxfs/xfs_ialloc_btree.h
+++ b/fs/xfs/libxfs/xfs_ialloc_btree.h
@@ -57,10 +57,9 @@ unsigned int xfs_inobt_maxrecs(struct xfs_mount *mp, unsigned int blocklen,
uint64_t xfs_inobt_irec_to_allocmask(const struct xfs_inobt_rec_incore *irec);
#if defined(DEBUG) || defined(XFS_WARN)
-int xfs_inobt_rec_check_count(struct xfs_mount *,
- struct xfs_inobt_rec_incore *);
+int xfs_inobt_rec_check_count(struct xfs_inobt_rec_incore *);
#else
-#define xfs_inobt_rec_check_count(mp, rec) 0
+#define xfs_inobt_rec_check_count(rec) 0
#endif /* DEBUG */
int xfs_finobt_calc_reserves(struct xfs_perag *perag, struct xfs_trans *tp,
--
2.55.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 06/14] xfs: remove unused mp argument from xfs_parent_finish()
2026-09-14 20:46 [PATCH 0/14] xfs: remove unused arguments from many functions Eric Sandeen
` (4 preceding siblings ...)
2026-09-14 20:46 ` [PATCH 05/14] xfs: remove unused mp argument from xfs_inobt_rec_check_count() Eric Sandeen
@ 2026-09-14 20:46 ` Eric Sandeen
2026-09-14 20:46 ` [PATCH 07/14] xfs: remove unused tp argument from xfs_rmap_update_hook() Eric Sandeen
` (7 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: Eric Sandeen @ 2026-09-14 20:46 UTC (permalink / raw)
To: linux-xfs; +Cc: Eric Sandeen
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
fs/xfs/libxfs/xfs_metadir.c | 2 +-
fs/xfs/libxfs/xfs_parent.h | 1 -
fs/xfs/xfs_inode.c | 18 +++++++++---------
fs/xfs/xfs_symlink.c | 4 ++--
4 files changed, 12 insertions(+), 13 deletions(-)
diff --git a/fs/xfs/libxfs/xfs_metadir.c b/fs/xfs/libxfs/xfs_metadir.c
index 7c6b086b73db..cc45a8a5aed9 100644
--- a/fs/xfs/libxfs/xfs_metadir.c
+++ b/fs/xfs/libxfs/xfs_metadir.c
@@ -163,7 +163,7 @@ xfs_metadir_teardown(
trace_xfs_metadir_teardown(upd, error);
if (upd->ppargs) {
- xfs_parent_finish(upd->dp->i_mount, upd->ppargs);
+ xfs_parent_finish(upd->ppargs);
upd->ppargs = NULL;
}
diff --git a/fs/xfs/libxfs/xfs_parent.h b/fs/xfs/libxfs/xfs_parent.h
index 8eb4de9c5f1a..1dd3968a78b1 100644
--- a/fs/xfs/libxfs/xfs_parent.h
+++ b/fs/xfs/libxfs/xfs_parent.h
@@ -72,7 +72,6 @@ xfs_parent_start(
/* Finish a parent pointer update by freeing the context object. */
static inline void
xfs_parent_finish(
- struct xfs_mount *mp,
struct xfs_parent_args *ppargs)
{
if (ppargs)
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c
index 030a7c8f2c12..64643fb8b591 100644
--- a/fs/xfs/xfs_inode.c
+++ b/fs/xfs/xfs_inode.c
@@ -755,7 +755,7 @@ xfs_create(
*ipp = du.ip;
xfs_iunlock(du.ip, XFS_ILOCK_EXCL);
xfs_iunlock(dp, XFS_ILOCK_EXCL);
- xfs_parent_finish(mp, du.ppargs);
+ xfs_parent_finish(du.ppargs);
return 0;
out_trans_cancel:
@@ -772,7 +772,7 @@ xfs_create(
xfs_irele(du.ip);
}
out_parent:
- xfs_parent_finish(mp, du.ppargs);
+ xfs_parent_finish(du.ppargs);
out_release_dquots:
xfs_qm_dqrele(udqp);
xfs_qm_dqrele(gdqp);
@@ -972,7 +972,7 @@ xfs_link(
error = xfs_trans_commit(tp);
xfs_iunlock(tdp, XFS_ILOCK_EXCL);
xfs_iunlock(sip, XFS_ILOCK_EXCL);
- xfs_parent_finish(mp, du.ppargs);
+ xfs_parent_finish(du.ppargs);
return error;
error_return:
@@ -980,7 +980,7 @@ xfs_link(
xfs_iunlock(tdp, XFS_ILOCK_EXCL);
xfs_iunlock(sip, XFS_ILOCK_EXCL);
out_parent:
- xfs_parent_finish(mp, du.ppargs);
+ xfs_parent_finish(du.ppargs);
std_return:
if (error == -ENOSPC && nospace_error)
error = nospace_error;
@@ -1985,7 +1985,7 @@ xfs_remove(
xfs_iunlock(ip, XFS_ILOCK_EXCL);
xfs_iunlock(dp, XFS_ILOCK_EXCL);
- xfs_parent_finish(mp, du.ppargs);
+ xfs_parent_finish(du.ppargs);
return 0;
out_trans_cancel:
@@ -1994,7 +1994,7 @@ xfs_remove(
xfs_iunlock(ip, XFS_ILOCK_EXCL);
xfs_iunlock(dp, XFS_ILOCK_EXCL);
out_parent:
- xfs_parent_finish(mp, du.ppargs);
+ xfs_parent_finish(du.ppargs);
std_return:
return error;
}
@@ -2357,11 +2357,11 @@ xfs_rename(
out_unlock:
xfs_iunlock_rename(inodes, num_inodes);
out_tgt_ppargs:
- xfs_parent_finish(mp, du_tgt.ppargs);
+ xfs_parent_finish(du_tgt.ppargs);
out_wip_ppargs:
- xfs_parent_finish(mp, du_wip.ppargs);
+ xfs_parent_finish(du_wip.ppargs);
out_src_ppargs:
- xfs_parent_finish(mp, du_src.ppargs);
+ xfs_parent_finish(du_src.ppargs);
out_release_wip:
if (du_wip.ip)
xfs_irele(du_wip.ip);
diff --git a/fs/xfs/xfs_symlink.c b/fs/xfs/xfs_symlink.c
index 5585ac7f4d16..cc13819df6f2 100644
--- a/fs/xfs/xfs_symlink.c
+++ b/fs/xfs/xfs_symlink.c
@@ -219,7 +219,7 @@ xfs_symlink(
*ipp = du.ip;
xfs_iunlock(du.ip, XFS_ILOCK_EXCL);
xfs_iunlock(dp, XFS_ILOCK_EXCL);
- xfs_parent_finish(mp, du.ppargs);
+ xfs_parent_finish(du.ppargs);
return 0;
out_trans_cancel:
@@ -236,7 +236,7 @@ xfs_symlink(
xfs_irele(du.ip);
}
out_parent:
- xfs_parent_finish(mp, du.ppargs);
+ xfs_parent_finish(du.ppargs);
out_release_dquots:
xfs_qm_dqrele(udqp);
xfs_qm_dqrele(gdqp);
--
2.55.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 07/14] xfs: remove unused tp argument from xfs_rmap_update_hook()
2026-09-14 20:46 [PATCH 0/14] xfs: remove unused arguments from many functions Eric Sandeen
` (5 preceding siblings ...)
2026-09-14 20:46 ` [PATCH 06/14] xfs: remove unused mp argument from xfs_parent_finish() Eric Sandeen
@ 2026-09-14 20:46 ` Eric Sandeen
2026-09-14 20:46 ` [PATCH 08/14] xfs: remove unused mp argument from xfs_rtrefcount_broot_space_calc() Eric Sandeen
` (6 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: Eric Sandeen @ 2026-09-14 20:46 UTC (permalink / raw)
To: linux-xfs; +Cc: Eric Sandeen
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
fs/xfs/libxfs/xfs_rmap.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/fs/xfs/libxfs/xfs_rmap.c b/fs/xfs/libxfs/xfs_rmap.c
index 34d218de21a9..37780a0526d8 100644
--- a/fs/xfs/libxfs/xfs_rmap.c
+++ b/fs/xfs/libxfs/xfs_rmap.c
@@ -904,7 +904,6 @@ xfs_rmap_hook_enable(void)
/* Call downstream hooks for a reverse mapping update. */
static inline void
xfs_rmap_update_hook(
- struct xfs_trans *tp,
struct xfs_group *xg,
enum xfs_rmap_intent_type op,
xfs_agblock_t startblock,
@@ -952,7 +951,7 @@ xfs_rmap_hook_setup(
xfs_hook_setup(&hook->rmap_hook, mod_fn);
}
#else
-# define xfs_rmap_update_hook(t, p, o, s, b, u, oi) do { } while (0)
+# define xfs_rmap_update_hook(p, o, s, b, u, oi) do { } while (0)
#endif /* CONFIG_XFS_LIVE_HOOKS */
/*
@@ -975,7 +974,7 @@ xfs_rmap_free(
return 0;
cur = xfs_rmapbt_init_cursor(mp, tp, agbp, pag);
- xfs_rmap_update_hook(tp, pag_group(pag), XFS_RMAP_UNMAP, bno, len,
+ xfs_rmap_update_hook(pag_group(pag), XFS_RMAP_UNMAP, bno, len,
false, oinfo);
error = xfs_rmap_unmap(cur, bno, len, false, oinfo);
@@ -1220,7 +1219,7 @@ xfs_rmap_alloc(
return 0;
cur = xfs_rmapbt_init_cursor(mp, tp, agbp, pag);
- xfs_rmap_update_hook(tp, pag_group(pag), XFS_RMAP_MAP, bno, len, false,
+ xfs_rmap_update_hook(pag_group(pag), XFS_RMAP_MAP, bno, len, false,
oinfo);
error = xfs_rmap_map(cur, bno, len, false, oinfo);
@@ -2721,7 +2720,7 @@ xfs_rmap_finish_one(
if (error)
return error;
- xfs_rmap_update_hook(tp, ri->ri_group, ri->ri_type, bno,
+ xfs_rmap_update_hook(ri->ri_group, ri->ri_type, bno,
ri->ri_bmap.br_blockcount, unwritten, &oinfo);
return 0;
}
--
2.55.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 08/14] xfs: remove unused mp argument from xfs_rtrefcount_broot_space_calc()
2026-09-14 20:46 [PATCH 0/14] xfs: remove unused arguments from many functions Eric Sandeen
` (6 preceding siblings ...)
2026-09-14 20:46 ` [PATCH 07/14] xfs: remove unused tp argument from xfs_rmap_update_hook() Eric Sandeen
@ 2026-09-14 20:46 ` Eric Sandeen
2026-09-14 20:46 ` [PATCH 09/14] xfs: remove unused mp argument from xfs_rtrefcount_broot_space() Eric Sandeen
` (5 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: Eric Sandeen @ 2026-09-14 20:46 UTC (permalink / raw)
To: linux-xfs; +Cc: Eric Sandeen
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
fs/xfs/libxfs/xfs_rtrefcount_btree.c | 6 +++---
fs/xfs/libxfs/xfs_rtrefcount_btree.h | 3 +--
fs/xfs/scrub/rtrefcount_repair.c | 3 +--
3 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/fs/xfs/libxfs/xfs_rtrefcount_btree.c b/fs/xfs/libxfs/xfs_rtrefcount_btree.c
index 22acc1411aac..0e0b0c7ba80d 100644
--- a/fs/xfs/libxfs/xfs_rtrefcount_btree.c
+++ b/fs/xfs/libxfs/xfs_rtrefcount_btree.c
@@ -311,7 +311,7 @@ xfs_rtrefcountbt_broot_realloc(
unsigned int old_size = ifp->if_broot_bytes;
const unsigned int level = cur->bc_nlevels - 1;
- new_size = xfs_rtrefcount_broot_space_calc(mp, level, new_numrecs);
+ new_size = xfs_rtrefcount_broot_space_calc(level, new_numrecs);
/* Handle the nop case quietly. */
if (new_size == old_size)
@@ -658,7 +658,7 @@ xfs_iformat_rtrefcount(
}
broot = xfs_broot_alloc(xfs_ifork_ptr(ip, XFS_DATA_FORK),
- xfs_rtrefcount_broot_space_calc(mp, level, numrecs));
+ xfs_rtrefcount_broot_space_calc(level, numrecs));
if (broot)
xfs_rtrefcountbt_from_disk(ip, dfp, dsize, broot);
return 0;
@@ -748,7 +748,7 @@ xfs_rtrefcountbt_create(
/* Initialize the empty incore btree root. */
broot = xfs_broot_realloc(ifp,
- xfs_rtrefcount_broot_space_calc(mp, 0, 0));
+ xfs_rtrefcount_broot_space_calc(0, 0));
if (broot)
xfs_btree_init_block(mp, broot, &xfs_rtrefcountbt_ops, 0, 0,
I_INO(ip));
diff --git a/fs/xfs/libxfs/xfs_rtrefcount_btree.h b/fs/xfs/libxfs/xfs_rtrefcount_btree.h
index a99b7a8aec86..aeef004ffdc9 100644
--- a/fs/xfs/libxfs/xfs_rtrefcount_btree.h
+++ b/fs/xfs/libxfs/xfs_rtrefcount_btree.h
@@ -129,7 +129,6 @@ xfs_rtrefcount_broot_ptr_addr(
*/
static inline size_t
xfs_rtrefcount_broot_space_calc(
- struct xfs_mount *mp,
unsigned int level,
unsigned int nrecs)
{
@@ -148,7 +147,7 @@ xfs_rtrefcount_broot_space_calc(
static inline size_t
xfs_rtrefcount_broot_space(struct xfs_mount *mp, struct xfs_rtrefcount_root *bb)
{
- return xfs_rtrefcount_broot_space_calc(mp, be16_to_cpu(bb->bb_level),
+ return xfs_rtrefcount_broot_space_calc(be16_to_cpu(bb->bb_level),
be16_to_cpu(bb->bb_numrecs));
}
diff --git a/fs/xfs/scrub/rtrefcount_repair.c b/fs/xfs/scrub/rtrefcount_repair.c
index 2b939960c7dd..c78a6d2990c5 100644
--- a/fs/xfs/scrub/rtrefcount_repair.c
+++ b/fs/xfs/scrub/rtrefcount_repair.c
@@ -596,8 +596,7 @@ xrep_rtrefc_iroot_size(
unsigned int nr_this_level,
void *priv)
{
- return xfs_rtrefcount_broot_space_calc(cur->bc_mp, level,
- nr_this_level);
+ return xfs_rtrefcount_broot_space_calc(level, nr_this_level);
}
/*
--
2.55.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 09/14] xfs: remove unused mp argument from xfs_rtrefcount_broot_space()
2026-09-14 20:46 [PATCH 0/14] xfs: remove unused arguments from many functions Eric Sandeen
` (7 preceding siblings ...)
2026-09-14 20:46 ` [PATCH 08/14] xfs: remove unused mp argument from xfs_rtrefcount_broot_space_calc() Eric Sandeen
@ 2026-09-14 20:46 ` Eric Sandeen
2026-09-14 20:46 ` [PATCH 10/14] xfs: remove unused mp argument from xfs_rtrmap_broot_space_calc() Eric Sandeen
` (4 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: Eric Sandeen @ 2026-09-14 20:46 UTC (permalink / raw)
To: linux-xfs; +Cc: Eric Sandeen
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
fs/xfs/libxfs/xfs_rtrefcount_btree.c | 2 +-
fs/xfs/libxfs/xfs_rtrefcount_btree.h | 2 +-
fs/xfs/scrub/inode_repair.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/xfs/libxfs/xfs_rtrefcount_btree.c b/fs/xfs/libxfs/xfs_rtrefcount_btree.c
index 0e0b0c7ba80d..423851c77ba4 100644
--- a/fs/xfs/libxfs/xfs_rtrefcount_btree.c
+++ b/fs/xfs/libxfs/xfs_rtrefcount_btree.c
@@ -599,7 +599,7 @@ xfs_rtrefcountbt_from_disk(
unsigned int maxrecs;
unsigned int rblocklen;
- rblocklen = xfs_rtrefcount_broot_space(mp, dblock);
+ rblocklen = xfs_rtrefcount_broot_space(dblock);
xfs_btree_init_block(mp, rblock, &xfs_rtrefcountbt_ops, 0, 0,
I_INO(ip));
diff --git a/fs/xfs/libxfs/xfs_rtrefcount_btree.h b/fs/xfs/libxfs/xfs_rtrefcount_btree.h
index aeef004ffdc9..9ab6ecf90ba5 100644
--- a/fs/xfs/libxfs/xfs_rtrefcount_btree.h
+++ b/fs/xfs/libxfs/xfs_rtrefcount_btree.h
@@ -145,7 +145,7 @@ xfs_rtrefcount_broot_space_calc(
* btree root block.
*/
static inline size_t
-xfs_rtrefcount_broot_space(struct xfs_mount *mp, struct xfs_rtrefcount_root *bb)
+xfs_rtrefcount_broot_space(struct xfs_rtrefcount_root *bb)
{
return xfs_rtrefcount_broot_space_calc(be16_to_cpu(bb->bb_level),
be16_to_cpu(bb->bb_numrecs));
diff --git a/fs/xfs/scrub/inode_repair.c b/fs/xfs/scrub/inode_repair.c
index 42e0d7a6c7fd..cdfde3cea5fb 100644
--- a/fs/xfs/scrub/inode_repair.c
+++ b/fs/xfs/scrub/inode_repair.c
@@ -1405,7 +1405,7 @@ xrep_dinode_ensure_forkoff(
break;
case XFS_METAFILE_RTREFCOUNT:
rcdr = XFS_DFORK_PTR(dip, XFS_DATA_FORK);
- dfork_min = xfs_rtrefcount_broot_space(sc->mp, rcdr);
+ dfork_min = xfs_rtrefcount_broot_space(rcdr);
break;
default:
dfork_min = 0;
--
2.55.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 10/14] xfs: remove unused mp argument from xfs_rtrmap_broot_space_calc()
2026-09-14 20:46 [PATCH 0/14] xfs: remove unused arguments from many functions Eric Sandeen
` (8 preceding siblings ...)
2026-09-14 20:46 ` [PATCH 09/14] xfs: remove unused mp argument from xfs_rtrefcount_broot_space() Eric Sandeen
@ 2026-09-14 20:46 ` Eric Sandeen
2026-09-14 20:46 ` [PATCH 11/14] xfs: remove unused mp argument from xfs_calc_default_atomic_ioend_reservation() Eric Sandeen
` (3 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: Eric Sandeen @ 2026-09-14 20:46 UTC (permalink / raw)
To: linux-xfs; +Cc: Eric Sandeen
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
fs/xfs/libxfs/xfs_rtrmap_btree.c | 6 +++---
fs/xfs/libxfs/xfs_rtrmap_btree.h | 3 +--
fs/xfs/scrub/rtrmap_repair.c | 2 +-
3 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/fs/xfs/libxfs/xfs_rtrmap_btree.c b/fs/xfs/libxfs/xfs_rtrmap_btree.c
index c264bc5651c0..e36c2e006c5d 100644
--- a/fs/xfs/libxfs/xfs_rtrmap_btree.c
+++ b/fs/xfs/libxfs/xfs_rtrmap_btree.c
@@ -412,7 +412,7 @@ xfs_rtrmapbt_broot_realloc(
unsigned int old_size = ifp->if_broot_bytes;
const unsigned int level = cur->bc_nlevels - 1;
- new_size = xfs_rtrmap_broot_space_calc(mp, level, new_numrecs);
+ new_size = xfs_rtrmap_broot_space_calc(level, new_numrecs);
/* Handle the nop case quietly. */
if (new_size == old_size)
@@ -893,7 +893,7 @@ xfs_iformat_rtrmap(
}
broot = xfs_broot_alloc(xfs_ifork_ptr(ip, XFS_DATA_FORK),
- xfs_rtrmap_broot_space_calc(mp, level, numrecs));
+ xfs_rtrmap_broot_space_calc(level, numrecs));
if (broot)
xfs_rtrmapbt_from_disk(ip, dfp, dsize, broot);
return 0;
@@ -978,7 +978,7 @@ xfs_rtrmapbt_create(
ASSERT(ifp->if_bytes == 0);
/* Initialize the empty incore btree root. */
- broot = xfs_broot_realloc(ifp, xfs_rtrmap_broot_space_calc(mp, 0, 0));
+ broot = xfs_broot_realloc(ifp, xfs_rtrmap_broot_space_calc(0, 0));
if (broot)
xfs_btree_init_block(mp, broot, &xfs_rtrmapbt_ops, 0, 0,
I_INO(ip));
diff --git a/fs/xfs/libxfs/xfs_rtrmap_btree.h b/fs/xfs/libxfs/xfs_rtrmap_btree.h
index e328fd62a149..c59a144b4bbf 100644
--- a/fs/xfs/libxfs/xfs_rtrmap_btree.h
+++ b/fs/xfs/libxfs/xfs_rtrmap_btree.h
@@ -140,7 +140,6 @@ xfs_rtrmap_broot_ptr_addr(
*/
static inline size_t
xfs_rtrmap_broot_space_calc(
- struct xfs_mount *mp,
unsigned int level,
unsigned int nrecs)
{
@@ -159,7 +158,7 @@ xfs_rtrmap_broot_space_calc(
static inline size_t
xfs_rtrmap_broot_space(struct xfs_mount *mp, struct xfs_rtrmap_root *bb)
{
- return xfs_rtrmap_broot_space_calc(mp, be16_to_cpu(bb->bb_level),
+ return xfs_rtrmap_broot_space_calc(be16_to_cpu(bb->bb_level),
be16_to_cpu(bb->bb_numrecs));
}
diff --git a/fs/xfs/scrub/rtrmap_repair.c b/fs/xfs/scrub/rtrmap_repair.c
index a2b72e61edf5..5cfa4470c57c 100644
--- a/fs/xfs/scrub/rtrmap_repair.c
+++ b/fs/xfs/scrub/rtrmap_repair.c
@@ -693,7 +693,7 @@ xrep_rtrmap_iroot_size(
unsigned int nr_this_level,
void *priv)
{
- return xfs_rtrmap_broot_space_calc(cur->bc_mp, level, nr_this_level);
+ return xfs_rtrmap_broot_space_calc(level, nr_this_level);
}
/*
--
2.55.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 11/14] xfs: remove unused mp argument from xfs_calc_default_atomic_ioend_reservation()
2026-09-14 20:46 [PATCH 0/14] xfs: remove unused arguments from many functions Eric Sandeen
` (9 preceding siblings ...)
2026-09-14 20:46 ` [PATCH 10/14] xfs: remove unused mp argument from xfs_rtrmap_broot_space_calc() Eric Sandeen
@ 2026-09-14 20:46 ` Eric Sandeen
2026-09-14 20:46 ` [PATCH 12/14] xfs: remove unused mp argument from xfs_verify_dablk() Eric Sandeen
` (2 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: Eric Sandeen @ 2026-09-14 20:46 UTC (permalink / raw)
To: linux-xfs; +Cc: Eric Sandeen
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
fs/xfs/libxfs/xfs_trans_resv.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/fs/xfs/libxfs/xfs_trans_resv.c b/fs/xfs/libxfs/xfs_trans_resv.c
index 3151e97ca8ff..57f682f0b54a 100644
--- a/fs/xfs/libxfs/xfs_trans_resv.c
+++ b/fs/xfs/libxfs/xfs_trans_resv.c
@@ -1292,7 +1292,6 @@ xfs_calc_namespace_reservations(
STATIC void
xfs_calc_default_atomic_ioend_reservation(
- struct xfs_mount *mp,
struct xfs_trans_resv *resp)
{
/* Pick a default that will scale reasonably for the log size. */
@@ -1398,7 +1397,7 @@ xfs_trans_resv_calc(
* Now that we've finished computing the static reservations, we can
* compute the dynamic reservation for atomic writes.
*/
- xfs_calc_default_atomic_ioend_reservation(mp, resp);
+ xfs_calc_default_atomic_ioend_reservation(resp);
}
/*
@@ -1508,7 +1507,7 @@ xfs_calc_atomic_write_log_geometry(
ASSERT(blockcount > 0);
- xfs_calc_default_atomic_ioend_reservation(mp, M_RES(mp));
+ xfs_calc_default_atomic_ioend_reservation(M_RES(mp));
per_intent = xfs_calc_atomic_write_ioend_geometry(mp, &step_size);
@@ -1545,7 +1544,7 @@ xfs_calc_atomic_write_reservation(
* use the defaults.
*/
if (blockcount == 0) {
- xfs_calc_default_atomic_ioend_reservation(mp, M_RES(mp));
+ xfs_calc_default_atomic_ioend_reservation(M_RES(mp));
return 0;
}
--
2.55.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 12/14] xfs: remove unused mp argument from xfs_verify_dablk()
2026-09-14 20:46 [PATCH 0/14] xfs: remove unused arguments from many functions Eric Sandeen
` (10 preceding siblings ...)
2026-09-14 20:46 ` [PATCH 11/14] xfs: remove unused mp argument from xfs_calc_default_atomic_ioend_reservation() Eric Sandeen
@ 2026-09-14 20:46 ` Eric Sandeen
2026-09-14 20:46 ` [PATCH 13/14] xfs: remove unused mp argument from xfs_verify_fileoff() Eric Sandeen
2026-09-14 20:46 ` [PATCH 14/14] xfs: remove unused mp argument from xfs_verify_fileext() Eric Sandeen
13 siblings, 0 replies; 15+ messages in thread
From: Eric Sandeen @ 2026-09-14 20:46 UTC (permalink / raw)
To: linux-xfs; +Cc: Eric Sandeen
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
fs/xfs/libxfs/xfs_types.c | 1 -
fs/xfs/libxfs/xfs_types.h | 2 +-
fs/xfs/scrub/bmap.c | 5 ++---
3 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/fs/xfs/libxfs/xfs_types.c b/fs/xfs/libxfs/xfs_types.c
index 67c947a47f14..b5b0b6334d11 100644
--- a/fs/xfs/libxfs/xfs_types.c
+++ b/fs/xfs/libxfs/xfs_types.c
@@ -222,7 +222,6 @@ xfs_verify_icount(
/* Sanity-checking of dir/attr block offsets. */
bool
xfs_verify_dablk(
- struct xfs_mount *mp,
xfs_fileoff_t dabno)
{
xfs_dablk_t max_dablk = -1U;
diff --git a/fs/xfs/libxfs/xfs_types.h b/fs/xfs/libxfs/xfs_types.h
index f6f4f2d4b5db..d217220d2054 100644
--- a/fs/xfs/libxfs/xfs_types.h
+++ b/fs/xfs/libxfs/xfs_types.h
@@ -277,7 +277,7 @@ bool xfs_verify_rtbno(struct xfs_mount *mp, xfs_rtblock_t rtbno);
bool xfs_verify_rtbext(struct xfs_mount *mp, xfs_rtblock_t rtbno,
xfs_filblks_t len);
bool xfs_verify_icount(struct xfs_mount *mp, unsigned long long icount);
-bool xfs_verify_dablk(struct xfs_mount *mp, xfs_fileoff_t off);
+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);
diff --git a/fs/xfs/scrub/bmap.c b/fs/xfs/scrub/bmap.c
index 401c278725d2..dff2329649a4 100644
--- a/fs/xfs/scrub/bmap.c
+++ b/fs/xfs/scrub/bmap.c
@@ -453,18 +453,17 @@ xchk_bmap_dirattr_extent(
struct xchk_bmap_info *info,
struct xfs_bmbt_irec *irec)
{
- struct xfs_mount *mp = ip->i_mount;
xfs_fileoff_t off;
if (!S_ISDIR(VFS_I(ip)->i_mode) && info->whichfork != XFS_ATTR_FORK)
return;
- if (!xfs_verify_dablk(mp, irec->br_startoff))
+ if (!xfs_verify_dablk(irec->br_startoff))
xchk_fblock_set_corrupt(info->sc, info->whichfork,
irec->br_startoff);
off = irec->br_startoff + irec->br_blockcount - 1;
- if (!xfs_verify_dablk(mp, off))
+ if (!xfs_verify_dablk(off))
xchk_fblock_set_corrupt(info->sc, info->whichfork, off);
}
--
2.55.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 13/14] xfs: remove unused mp argument from xfs_verify_fileoff()
2026-09-14 20:46 [PATCH 0/14] xfs: remove unused arguments from many functions Eric Sandeen
` (11 preceding siblings ...)
2026-09-14 20:46 ` [PATCH 12/14] xfs: remove unused mp argument from xfs_verify_dablk() Eric Sandeen
@ 2026-09-14 20:46 ` Eric Sandeen
2026-09-14 20:46 ` [PATCH 14/14] xfs: remove unused mp argument from xfs_verify_fileext() Eric Sandeen
13 siblings, 0 replies; 15+ messages in thread
From: Eric Sandeen @ 2026-09-14 20:46 UTC (permalink / raw)
To: linux-xfs; +Cc: Eric Sandeen
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 487bd4f68ebb..9a163c1c6240 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
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 14/14] xfs: remove unused mp argument from xfs_verify_fileext()
2026-09-14 20:46 [PATCH 0/14] xfs: remove unused arguments from many functions Eric Sandeen
` (12 preceding siblings ...)
2026-09-14 20:46 ` [PATCH 13/14] xfs: remove unused mp argument from xfs_verify_fileoff() Eric Sandeen
@ 2026-09-14 20:46 ` Eric Sandeen
13 siblings, 0 replies; 15+ messages in thread
From: Eric Sandeen @ 2026-09-14 20:46 UTC (permalink / raw)
To: linux-xfs; +Cc: Eric Sandeen
(Follows from last patch)
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
fs/xfs/libxfs/xfs_bmap.c | 2 +-
fs/xfs/libxfs/xfs_rmap.c | 4 ++--
fs/xfs/libxfs/xfs_types.c | 1 -
fs/xfs/libxfs/xfs_types.h | 3 +--
fs/xfs/scrub/bmap.c | 4 ++--
fs/xfs/scrub/bmap_repair.c | 4 ++--
fs/xfs/xfs_bmap_item.c | 2 +-
fs/xfs/xfs_exchmaps_item.c | 4 ++--
fs/xfs/xfs_rmap_item.c | 2 +-
9 files changed, 12 insertions(+), 14 deletions(-)
diff --git a/fs/xfs/libxfs/xfs_bmap.c b/fs/xfs/libxfs/xfs_bmap.c
index ca147dfaed05..ae91f63455c5 100644
--- a/fs/xfs/libxfs/xfs_bmap.c
+++ b/fs/xfs/libxfs/xfs_bmap.c
@@ -6087,7 +6087,7 @@ xfs_bmap_validate_extent_raw(
int whichfork,
struct xfs_bmbt_irec *irec)
{
- if (!xfs_verify_fileext(mp, irec->br_startoff, irec->br_blockcount))
+ if (!xfs_verify_fileext(irec->br_startoff, irec->br_blockcount))
return __this_address;
if (rtfile && whichfork == XFS_DATA_FORK) {
diff --git a/fs/xfs/libxfs/xfs_rmap.c b/fs/xfs/libxfs/xfs_rmap.c
index 37780a0526d8..14aef87837a9 100644
--- a/fs/xfs/libxfs/xfs_rmap.c
+++ b/fs/xfs/libxfs/xfs_rmap.c
@@ -260,7 +260,7 @@ xfs_rmap_check_irec(
/* Check for a valid fork offset, if applicable. */
if (is_inode && !is_bmbt &&
- !xfs_verify_fileext(mp, irec->rm_offset, irec->rm_blockcount))
+ !xfs_verify_fileext(irec->rm_offset, irec->rm_blockcount))
return __this_address;
return NULL;
@@ -310,7 +310,7 @@ xfs_rtrmap_check_inode_irec(
return __this_address;
if (!xfs_verify_rgbext(rtg, irec->rm_startblock, irec->rm_blockcount))
return __this_address;
- if (!xfs_verify_fileext(mp, irec->rm_offset, irec->rm_blockcount))
+ if (!xfs_verify_fileext(irec->rm_offset, irec->rm_blockcount))
return __this_address;
return NULL;
}
diff --git a/fs/xfs/libxfs/xfs_types.c b/fs/xfs/libxfs/xfs_types.c
index 32e6c0aaf467..f195a04dbf66 100644
--- a/fs/xfs/libxfs/xfs_types.c
+++ b/fs/xfs/libxfs/xfs_types.c
@@ -240,7 +240,6 @@ xfs_verify_fileoff(
/* Check that a range of file block offsets do not exceed the maximum. */
bool
xfs_verify_fileext(
- struct xfs_mount *mp,
xfs_fileoff_t off,
xfs_fileoff_t len)
{
diff --git a/fs/xfs/libxfs/xfs_types.h b/fs/xfs/libxfs/xfs_types.h
index adae81149680..19dd5e7c8b12 100644
--- a/fs/xfs/libxfs/xfs_types.h
+++ b/fs/xfs/libxfs/xfs_types.h
@@ -281,7 +281,6 @@ 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(xfs_fileoff_t off);
-bool xfs_verify_fileext(struct xfs_mount *mp, xfs_fileoff_t off,
- xfs_fileoff_t len);
+bool xfs_verify_fileext(xfs_fileoff_t off, xfs_fileoff_t len);
#endif /* __XFS_TYPES_H__ */
diff --git a/fs/xfs/scrub/bmap.c b/fs/xfs/scrub/bmap.c
index dff2329649a4..b56a63c73595 100644
--- a/fs/xfs/scrub/bmap.c
+++ b/fs/xfs/scrub/bmap.c
@@ -485,7 +485,7 @@ xchk_bmap_iextent(
xchk_fblock_set_corrupt(info->sc, info->whichfork,
irec->br_startoff);
- if (!xfs_verify_fileext(mp, irec->br_startoff, irec->br_blockcount))
+ if (!xfs_verify_fileext(irec->br_startoff, irec->br_blockcount))
xchk_fblock_set_corrupt(info->sc, info->whichfork,
irec->br_startoff);
@@ -887,7 +887,7 @@ xchk_bmap_iextent_delalloc(
xchk_fblock_set_corrupt(info->sc, info->whichfork,
irec->br_startoff);
- if (!xfs_verify_fileext(mp, irec->br_startoff, irec->br_blockcount))
+ if (!xfs_verify_fileext(irec->br_startoff, irec->br_blockcount))
xchk_fblock_set_corrupt(info->sc, info->whichfork,
irec->br_startoff);
diff --git a/fs/xfs/scrub/bmap_repair.c b/fs/xfs/scrub/bmap_repair.c
index eabffba47776..03af6cb92fcf 100644
--- a/fs/xfs/scrub/bmap_repair.c
+++ b/fs/xfs/scrub/bmap_repair.c
@@ -211,7 +211,7 @@ xrep_bmap_check_fork_rmap(
/* Check the file offset range. */
if (!(rec->rm_flags & XFS_RMAP_BMBT_BLOCK) &&
- !xfs_verify_fileext(sc->mp, rec->rm_offset, rec->rm_blockcount))
+ !xfs_verify_fileext(rec->rm_offset, rec->rm_blockcount))
return -EFSCORRUPTED;
/* No contradictory flags. */
@@ -389,7 +389,7 @@ xrep_bmap_check_rtfork_rmap(
return -EFSCORRUPTED;
/* Check the file offsets and physical extents. */
- if (!xfs_verify_fileext(sc->mp, rec->rm_offset, rec->rm_blockcount))
+ if (!xfs_verify_fileext(rec->rm_offset, rec->rm_blockcount))
return -EFSCORRUPTED;
/* Check that this is within the rtgroup. */
diff --git a/fs/xfs/xfs_bmap_item.c b/fs/xfs/xfs_bmap_item.c
index 89f6e79a955f..782dc24df3a0 100644
--- a/fs/xfs/xfs_bmap_item.c
+++ b/fs/xfs/xfs_bmap_item.c
@@ -442,7 +442,7 @@ xfs_bui_validate(
if (!xfs_verify_ino(mp, map->me_owner))
return false;
- if (!xfs_verify_fileext(mp, map->me_startoff, map->me_len))
+ if (!xfs_verify_fileext(map->me_startoff, map->me_len))
return false;
if (map->me_flags & XFS_BMAP_EXTENT_REALTIME)
diff --git a/fs/xfs/xfs_exchmaps_item.c b/fs/xfs/xfs_exchmaps_item.c
index c3745d33e54e..85955467d249 100644
--- a/fs/xfs/xfs_exchmaps_item.c
+++ b/fs/xfs/xfs_exchmaps_item.c
@@ -341,10 +341,10 @@ xfs_xmi_validate(
!xfs_verify_ino(mp, xlf->xmi_inode2))
return false;
- if (!xfs_verify_fileext(mp, xlf->xmi_startoff1, xlf->xmi_blockcount))
+ if (!xfs_verify_fileext(xlf->xmi_startoff1, xlf->xmi_blockcount))
return false;
- return xfs_verify_fileext(mp, xlf->xmi_startoff2, xlf->xmi_blockcount);
+ return xfs_verify_fileext(xlf->xmi_startoff2, xlf->xmi_blockcount);
}
/*
diff --git a/fs/xfs/xfs_rmap_item.c b/fs/xfs/xfs_rmap_item.c
index 2a3a73a8566d..0066983bc452 100644
--- a/fs/xfs/xfs_rmap_item.c
+++ b/fs/xfs/xfs_rmap_item.c
@@ -494,7 +494,7 @@ xfs_rui_validate_map(
!xfs_verify_ino(mp, map->me_owner))
return false;
- if (!xfs_verify_fileext(mp, map->me_startoff, map->me_len))
+ if (!xfs_verify_fileext(map->me_startoff, map->me_len))
return false;
if (isrt)
--
2.55.0
^ permalink raw reply related [flat|nested] 15+ messages in thread
end of thread, other threads:[~2026-09-14 20:52 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-14 20:46 [PATCH 0/14] xfs: remove unused arguments from many functions Eric Sandeen
2026-09-14 20:46 ` [PATCH 01/14] xfs: remove unused args argument from xfs_attr_node_lookup() Eric Sandeen
2026-09-14 20:46 ` [PATCH 02/14] xfs: remove unused rsvd argument from xfs_bmap_add_attrfork() Eric Sandeen
2026-09-14 20:46 ` [PATCH 03/14] xfs: remove unused mp and ops arguments from xfbtree_rec_bytes() Eric Sandeen
2026-09-14 20:46 ` [PATCH 04/14] xfs: remove unused mp argument from xfs_exchmaps_check_forks() Eric Sandeen
2026-09-14 20:46 ` [PATCH 05/14] xfs: remove unused mp argument from xfs_inobt_rec_check_count() Eric Sandeen
2026-09-14 20:46 ` [PATCH 06/14] xfs: remove unused mp argument from xfs_parent_finish() Eric Sandeen
2026-09-14 20:46 ` [PATCH 07/14] xfs: remove unused tp argument from xfs_rmap_update_hook() Eric Sandeen
2026-09-14 20:46 ` [PATCH 08/14] xfs: remove unused mp argument from xfs_rtrefcount_broot_space_calc() Eric Sandeen
2026-09-14 20:46 ` [PATCH 09/14] xfs: remove unused mp argument from xfs_rtrefcount_broot_space() Eric Sandeen
2026-09-14 20:46 ` [PATCH 10/14] xfs: remove unused mp argument from xfs_rtrmap_broot_space_calc() Eric Sandeen
2026-09-14 20:46 ` [PATCH 11/14] xfs: remove unused mp argument from xfs_calc_default_atomic_ioend_reservation() Eric Sandeen
2026-09-14 20:46 ` [PATCH 12/14] xfs: remove unused mp argument from xfs_verify_dablk() Eric Sandeen
2026-09-14 20:46 ` [PATCH 13/14] xfs: remove unused mp argument from xfs_verify_fileoff() Eric Sandeen
2026-09-14 20:46 ` [PATCH 14/14] xfs: remove unused mp argument from xfs_verify_fileext() Eric Sandeen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox