summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_inode.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2024-11-03 20:18:28 -0800
committerDarrick J. Wong <djwong@kernel.org>2024-11-05 13:38:24 -0800
commit6abd82ab6ea48430c13caebaad436ca6b5f2c34d (patch)
tree9144ba3304f0e661d4ef375f2623f1ba1ca06219 /fs/xfs/xfs_inode.c
parent856a920ac2bbb2352ef6aa9e1e052f2e80677df7 (diff)
xfs: add a xfs_agino_to_ino helper
Add a helpers to convert an agino to an ino based on a pag structure. This provides a simpler conversion and better type safety compared to the existing code that passes the mount structure and the agno separately. 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>
Diffstat (limited to 'fs/xfs/xfs_inode.c')
-rw-r--r--fs/xfs/xfs_inode.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c
index 19dcb569a3e7..5529ff39b640 100644
--- a/fs/xfs/xfs_inode.c
+++ b/fs/xfs/xfs_inode.c
@@ -1516,7 +1516,6 @@ xfs_iunlink_reload_next(
struct xfs_perag *pag = agibp->b_pag;
struct xfs_mount *mp = pag->pag_mount;
struct xfs_inode *next_ip = NULL;
- xfs_ino_t ino;
int error;
ASSERT(next_agino != NULLAGINO);
@@ -1538,8 +1537,8 @@ xfs_iunlink_reload_next(
* but we'd rather shut down now since we're already running in a weird
* situation.
*/
- ino = XFS_AGINO_TO_INO(mp, pag->pag_agno, next_agino);
- error = xfs_iget(mp, tp, ino, XFS_IGET_UNTRUSTED, 0, &next_ip);
+ error = xfs_iget(mp, tp, xfs_agino_to_ino(pag, next_agino),
+ XFS_IGET_UNTRUSTED, 0, &next_ip);
if (error) {
xfs_ag_mark_sick(pag, XFS_SICK_AG_AGI);
return error;