diff mbox series

[07/37] xfs: remove xfs_validate_rtextents

Message ID 172954783578.34558.6394842867679427215.stgit@frogsfrogsfrogs (mailing list archive)
State New
Headers show
Series [01/37] libxfs: require -std=gnu11 for compilation by default | expand

Commit Message

Darrick J. Wong Oct. 21, 2024, 10 p.m. UTC
From: Christoph Hellwig <hch@lst.de>

Source kernel commit: 021d9c107e29a598e51fb66a54b22e5416125408

Replace xfs_validate_rtextents with an open coded check for 0
rtextents.  The name for the function implies it does a lot more
than a zero check, which is more obvious when open coded.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
---
 libxfs/xfs_sb.c    |    2 +-
 libxfs/xfs_types.h |   12 ------------
 2 files changed, 1 insertion(+), 13 deletions(-)
diff mbox series

Patch

diff --git a/libxfs/xfs_sb.c b/libxfs/xfs_sb.c
index bedb36a0620dff..a50c9c06c3f19c 100644
--- a/libxfs/xfs_sb.c
+++ b/libxfs/xfs_sb.c
@@ -511,7 +511,7 @@  xfs_validate_sb_common(
 		rbmblocks = howmany_64(sbp->sb_rextents,
 				       NBBY * sbp->sb_blocksize);
 
-		if (!xfs_validate_rtextents(rexts) ||
+		if (sbp->sb_rextents == 0 ||
 		    sbp->sb_rextents != rexts ||
 		    sbp->sb_rextslog != xfs_compute_rextslog(rexts) ||
 		    sbp->sb_rbmblocks != rbmblocks) {
diff --git a/libxfs/xfs_types.h b/libxfs/xfs_types.h
index 76eb9e328835f8..a8cd44d03ef648 100644
--- a/libxfs/xfs_types.h
+++ b/libxfs/xfs_types.h
@@ -235,16 +235,4 @@  bool xfs_verify_fileoff(struct xfs_mount *mp, xfs_fileoff_t off);
 bool xfs_verify_fileext(struct xfs_mount *mp, xfs_fileoff_t off,
 		xfs_fileoff_t len);
 
-/* Do we support an rt volume having this number of rtextents? */
-static inline bool
-xfs_validate_rtextents(
-	xfs_rtbxlen_t		rtextents)
-{
-	/* No runt rt volumes */
-	if (rtextents == 0)
-		return false;
-
-	return true;
-}
-
 #endif	/* __XFS_TYPES_H__ */