[PATCH 5/5] xfs: remove never-implemented scrub declarations

From: Zizhi Wo

Date: Fri Sep 04 2026 - 03:12:26 EST


From: Zizhi Wo <wozizhi@xxxxxxxxxx>

Commit dcb660f9222f ("xfs: probe the scrub ioctl") added a declaration for
xfs_scrub_tester() (now xchk_tester) as a placeholder in 2017, but the
function was never implemented.

Likewise commit 99d9d8d05da2 ("xfs: scrub inode block mappings") declared
xfs_scrub_setup_inode_bmap_data() (now xchk_setup_inode_bmap_data) in 2017,
which was never implemented either; the scrub ioctl table uses
xchk_setup_inode_bmap() for BMBTD/BMBTA/BMBTC checks.

Finally, the !CONFIG_XFS_ONLINE_REPAIR stub of xrep_tempfile_iolock_both()
added by commit 84c14ee39dd3 ("xfs: create temporary files and directories
for online repair") has no callers.

Remove these dead declarations and the unused stub.

Assisted-by: Claude-Code:GLM-5.2
Signed-off-by: Zizhi Wo <wozizhi@xxxxxxxxxx>
---
Note: if any of them are intended to be implemented in the future, please
just ignore the corresponding patch. I'm only sending these because they
have been sitting unimplemented since 2017.

fs/xfs/scrub/common.h | 1 -
fs/xfs/scrub/scrub.h | 1 -
fs/xfs/scrub/tempfile.h | 4 ----
3 files changed, 6 deletions(-)

diff --git a/fs/xfs/scrub/common.h b/fs/xfs/scrub/common.h
index 9d627fd50687..f0f073a93413 100644
--- a/fs/xfs/scrub/common.h
+++ b/fs/xfs/scrub/common.h
@@ -74,7 +74,6 @@ int xchk_setup_ag_rmapbt(struct xfs_scrub *sc);
int xchk_setup_ag_refcountbt(struct xfs_scrub *sc);
int xchk_setup_inode(struct xfs_scrub *sc);
int xchk_setup_inode_bmap(struct xfs_scrub *sc);
-int xchk_setup_inode_bmap_data(struct xfs_scrub *sc);
int xchk_setup_directory(struct xfs_scrub *sc);
int xchk_setup_xattr(struct xfs_scrub *sc);
int xchk_setup_symlink(struct xfs_scrub *sc);
diff --git a/fs/xfs/scrub/scrub.h b/fs/xfs/scrub/scrub.h
index 6d7d3523b71f..737a5d6db15f 100644
--- a/fs/xfs/scrub/scrub.h
+++ b/fs/xfs/scrub/scrub.h
@@ -261,7 +261,6 @@ static inline int xchk_nothing(struct xfs_scrub *sc)
}

/* Metadata scrubbers */
-int xchk_tester(struct xfs_scrub *sc);
int xchk_superblock(struct xfs_scrub *sc);
int xchk_agf(struct xfs_scrub *sc);
int xchk_agfl(struct xfs_scrub *sc);
diff --git a/fs/xfs/scrub/tempfile.h b/fs/xfs/scrub/tempfile.h
index 71c1b54599c3..d44ed43bafe0 100644
--- a/fs/xfs/scrub/tempfile.h
+++ b/fs/xfs/scrub/tempfile.h
@@ -39,10 +39,6 @@ int xrep_tempfile_roll_trans(struct xfs_scrub *sc);
void xrep_tempfile_copyout_local(struct xfs_scrub *sc, int whichfork);
bool xrep_is_tempfile(const struct xfs_inode *ip);
#else
-static inline void xrep_tempfile_iolock_both(struct xfs_scrub *sc)
-{
- xchk_ilock(sc, XFS_IOLOCK_EXCL);
-}
# define xrep_is_tempfile(ip) (false)
# define xrep_tempfile_adjust_directory_tree(sc) (0)
# define xrep_tempfile_rele(sc)
--
2.52.0