xfs: rename xfs_get_perag

xfs_get_perag is really getting the perag that an inode belongs to
based on it's inode number. Convert the use of this function to just
get the perag from a provided ag number.  Use this new function to
obtain the per-ag structure when traversing the per AG inode trees
for sync and reclaim.

Signed-off-by: Dave Chinner <david@fromorbit.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alex Elder <aelder@sgi.com>
This commit is contained in:
Dave Chinner
2010-01-11 11:47:40 +00:00
committed by Alex Elder
parent c9c129714e
commit 5017e97d52
4 changed files with 27 additions and 21 deletions

View File

@@ -386,14 +386,14 @@ xfs_daddr_to_agbno(struct xfs_mount *mp, xfs_daddr_t d)
/*
* perag get/put wrappers for eventual ref counting
*/
static inline xfs_perag_t *
xfs_get_perag(struct xfs_mount *mp, xfs_ino_t ino)
static inline struct xfs_perag *
xfs_perag_get(struct xfs_mount *mp, xfs_agnumber_t agno)
{
return &mp->m_perag[XFS_INO_TO_AGNO(mp, ino)];
return &mp->m_perag[agno];
}
static inline void
xfs_put_perag(struct xfs_mount *mp, xfs_perag_t *pag)
xfs_perag_put(struct xfs_perag *pag)
{
/* nothing to see here, move along */
}