aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_inode.c
diff options
context:
space:
mode:
authorDave Chinner <david@fromorbit.com>2010-01-11 06:47:40 -0500
committerAlex Elder <aelder@sgi.com>2010-01-15 16:33:02 -0500
commit5017e97d52628fb8ae56e434e86ac2e72ddaac2b (patch)
treebbad07b8fc75e9d309d0a4c450a886eaf7e687fd /fs/xfs/xfs_inode.c
parentc9c129714e71c890bed1bd5b61697a896c3c2d54 (diff)
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>
Diffstat (limited to 'fs/xfs/xfs_inode.c')
-rw-r--r--fs/xfs/xfs_inode.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c
index ef77fd88c8e3..bd3d81636d51 100644
--- a/fs/xfs/xfs_inode.c
+++ b/fs/xfs/xfs_inode.c
@@ -1946,8 +1946,9 @@ xfs_ifree_cluster(
1946 xfs_inode_t *ip, **ip_found; 1946 xfs_inode_t *ip, **ip_found;
1947 xfs_inode_log_item_t *iip; 1947 xfs_inode_log_item_t *iip;
1948 xfs_log_item_t *lip; 1948 xfs_log_item_t *lip;
1949 xfs_perag_t *pag = xfs_get_perag(mp, inum); 1949 struct xfs_perag *pag;
1950 1950
1951 pag = xfs_perag_get(mp, XFS_INO_TO_AGNO(mp, inum));
1951 if (mp->m_sb.sb_blocksize >= XFS_INODE_CLUSTER_SIZE(mp)) { 1952 if (mp->m_sb.sb_blocksize >= XFS_INODE_CLUSTER_SIZE(mp)) {
1952 blks_per_cluster = 1; 1953 blks_per_cluster = 1;
1953 ninodes = mp->m_sb.sb_inopblock; 1954 ninodes = mp->m_sb.sb_inopblock;
@@ -2088,7 +2089,7 @@ xfs_ifree_cluster(
2088 } 2089 }
2089 2090
2090 kmem_free(ip_found); 2091 kmem_free(ip_found);
2091 xfs_put_perag(mp, pag); 2092 xfs_perag_put(pag);
2092} 2093}
2093 2094
2094/* 2095/*
@@ -2675,7 +2676,7 @@ xfs_iflush_cluster(
2675 xfs_buf_t *bp) 2676 xfs_buf_t *bp)
2676{ 2677{
2677 xfs_mount_t *mp = ip->i_mount; 2678 xfs_mount_t *mp = ip->i_mount;
2678 xfs_perag_t *pag = xfs_get_perag(mp, ip->i_ino); 2679 struct xfs_perag *pag;
2679 unsigned long first_index, mask; 2680 unsigned long first_index, mask;
2680 unsigned long inodes_per_cluster; 2681 unsigned long inodes_per_cluster;
2681 int ilist_size; 2682 int ilist_size;
@@ -2686,6 +2687,7 @@ xfs_iflush_cluster(
2686 int bufwasdelwri; 2687 int bufwasdelwri;
2687 int i; 2688 int i;
2688 2689
2690 pag = xfs_perag_get(mp, XFS_INO_TO_AGNO(mp, ip->i_ino));
2689 ASSERT(pag->pagi_inodeok); 2691 ASSERT(pag->pagi_inodeok);
2690 ASSERT(pag->pag_ici_init); 2692 ASSERT(pag->pag_ici_init);
2691 2693