aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/quota
diff options
context:
space:
mode:
authorDavid Chinner <david@fromorbit.com>2008-10-30 02:15:03 -0400
committerLachlan McIlroy <lachlan@sgi.com>2008-10-30 02:15:03 -0400
commitbc60a99323b3ec628273b5fa998285c87d464ca6 (patch)
tree5084bb53b48d1b9ba3ceed8a3995296cc21840c5 /fs/xfs/quota
parent2af75df7be7ca86965bf73766f827575d1c26fbd (diff)
[XFS] Use struct inodes instead of vnodes to kill vn_grab
With the sync code relocated to the linux-2.6 directory we can use struct inodes directly. If we do the same thing for the quota release code, we can remove vn_grab altogether. While here, convert the VN_BAD() checks to is_bad_inode() so we can remove vnodes entirely from this code. SGI-PV: 988140 SGI-Modid: xfs-linux-melb:xfs-kern:32304a Signed-off-by: David Chinner <david@fromorbit.com> Signed-off-by: Lachlan McIlroy <lachlan@sgi.com> Signed-off-by: Christoph Hellwig <hch@infradead.org>
Diffstat (limited to 'fs/xfs/quota')
-rw-r--r--fs/xfs/quota/xfs_qm_syscalls.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/fs/xfs/quota/xfs_qm_syscalls.c b/fs/xfs/quota/xfs_qm_syscalls.c
index 26152b9ccc6f..4254b074223b 100644
--- a/fs/xfs/quota/xfs_qm_syscalls.c
+++ b/fs/xfs/quota/xfs_qm_syscalls.c
@@ -1031,13 +1031,13 @@ xfs_qm_dqrele_inodes_ag(
1031 uint flags) 1031 uint flags)
1032{ 1032{
1033 xfs_inode_t *ip = NULL; 1033 xfs_inode_t *ip = NULL;
1034 struct inode *vp = NULL;
1035 xfs_perag_t *pag = &mp->m_perag[ag]; 1034 xfs_perag_t *pag = &mp->m_perag[ag];
1036 int first_index = 0; 1035 int first_index = 0;
1037 int nr_found; 1036 int nr_found;
1038 1037
1039 do { 1038 do {
1040 boolean_t vnode_refd = B_FALSE; 1039 boolean_t inode_refed;
1040 struct inode *inode;
1041 1041
1042 /* 1042 /*
1043 * use a gang lookup to find the next inode in the tree 1043 * use a gang lookup to find the next inode in the tree
@@ -1057,19 +1057,19 @@ xfs_qm_dqrele_inodes_ag(
1057 first_index = XFS_INO_TO_AGINO(mp, ip->i_ino + 1); 1057 first_index = XFS_INO_TO_AGINO(mp, ip->i_ino + 1);
1058 1058
1059 /* skip quota inodes and those in reclaim */ 1059 /* skip quota inodes and those in reclaim */
1060 vp = VFS_I(ip); 1060 inode = VFS_I(ip);
1061 if (!vp || ip == XFS_QI_UQIP(mp) || ip == XFS_QI_GQIP(mp)) { 1061 if (!inode || ip == XFS_QI_UQIP(mp) || ip == XFS_QI_GQIP(mp)) {
1062 ASSERT(ip->i_udquot == NULL); 1062 ASSERT(ip->i_udquot == NULL);
1063 ASSERT(ip->i_gdquot == NULL); 1063 ASSERT(ip->i_gdquot == NULL);
1064 read_unlock(&pag->pag_ici_lock); 1064 read_unlock(&pag->pag_ici_lock);
1065 continue; 1065 continue;
1066 } 1066 }
1067 if (xfs_ilock_nowait(ip, XFS_ILOCK_EXCL) == 0) { 1067 if (xfs_ilock_nowait(ip, XFS_ILOCK_EXCL) == 0) {
1068 vp = vn_grab(vp); 1068 inode = igrab(inode);
1069 read_unlock(&pag->pag_ici_lock); 1069 read_unlock(&pag->pag_ici_lock);
1070 if (!vp) 1070 if (!inode)
1071 continue; 1071 continue;
1072 vnode_refd = B_TRUE; 1072 inode_refed = B_TRUE;
1073 xfs_ilock(ip, XFS_ILOCK_EXCL); 1073 xfs_ilock(ip, XFS_ILOCK_EXCL);
1074 } else { 1074 } else {
1075 read_unlock(&pag->pag_ici_lock); 1075 read_unlock(&pag->pag_ici_lock);
@@ -1084,7 +1084,7 @@ xfs_qm_dqrele_inodes_ag(
1084 ip->i_gdquot = NULL; 1084 ip->i_gdquot = NULL;
1085 } 1085 }
1086 xfs_iunlock(ip, XFS_ILOCK_EXCL); 1086 xfs_iunlock(ip, XFS_ILOCK_EXCL);
1087 if (vnode_refd) 1087 if (inode_refed)
1088 IRELE(ip); 1088 IRELE(ip);
1089 } while (nr_found); 1089 } while (nr_found);
1090} 1090}