aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_qm_syscalls.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2012-03-14 12:53:34 -0400
committerBen Myers <bpm@sgi.com>2012-03-14 12:53:34 -0400
commitb84a3a96751f93071c1863f2962273973c8b8f5e (patch)
tree26409cbc65a9b4457e6c52e90879361fc42d2386 /fs/xfs/xfs_qm_syscalls.c
parent9f920f116426806bfa34c1422742e1bf7b7a2b4b (diff)
xfs: remove the per-filesystem list of dquots
Instead of keeping a separate per-filesystem list of dquots we can walk the radix tree for the two places where we need to iterate all quota structures. Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_qm_syscalls.c')
-rw-r--r--fs/xfs/xfs_qm_syscalls.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/fs/xfs/xfs_qm_syscalls.c b/fs/xfs/xfs_qm_syscalls.c
index b9ac268a2d7c..c4f396e437a8 100644
--- a/fs/xfs/xfs_qm_syscalls.c
+++ b/fs/xfs/xfs_qm_syscalls.c
@@ -66,7 +66,6 @@ xfs_qm_scall_quotaoff(
66 int error; 66 int error;
67 uint inactivate_flags; 67 uint inactivate_flags;
68 xfs_qoff_logitem_t *qoffstart; 68 xfs_qoff_logitem_t *qoffstart;
69 int nculprits;
70 69
71 /* 70 /*
72 * No file system can have quotas enabled on disk but not in core. 71 * No file system can have quotas enabled on disk but not in core.
@@ -172,18 +171,13 @@ xfs_qm_scall_quotaoff(
172 * This isn't protected by a particular lock directly, because we 171 * This isn't protected by a particular lock directly, because we
173 * don't want to take a mrlock every time we depend on quotas being on. 172 * don't want to take a mrlock every time we depend on quotas being on.
174 */ 173 */
175 mp->m_qflags &= ~(flags); 174 mp->m_qflags &= ~flags;
176 175
177 /* 176 /*
178 * Go through all the dquots of this file system and purge them, 177 * Go through all the dquots of this file system and purge them,
179 * according to what was turned off. We may not be able to get rid 178 * according to what was turned off.
180 * of all dquots, because dquots can have temporary references that
181 * are not attached to inodes. eg. xfs_setattr, xfs_create.
182 * So, if we couldn't purge all the dquots from the filesystem,
183 * we can't get rid of the incore data structures.
184 */ 179 */
185 while ((nculprits = xfs_qm_dqpurge_all(mp, dqtype))) 180 xfs_qm_dqpurge_all(mp, dqtype);
186 delay(10 * nculprits);
187 181
188 /* 182 /*
189 * Transactions that had started before ACTIVE state bit was cleared 183 * Transactions that had started before ACTIVE state bit was cleared