aboutsummaryrefslogtreecommitdiff
path: root/fs/xfs/quota
diff options
context:
space:
mode:
authorDave Chinner <david@fromorbit.com>2008-11-10 17:13:23 +1100
committerLachlan McIlroy <lachlan@redback.melbourne.sgi.com>2008-11-10 17:13:23 +1100
commit6307091fe69ae74747298bdcaf43119ad67bda3a (patch)
treec1feb80479b7ae4ebcf9a4336e50dfd18aebcb38 /fs/xfs/quota
parentcb4f0d1d4229f609f43c68acec69c7618ed72397 (diff)
[XFS] Avoid using inodes that haven't been completely initialised
The radix tree walks in xfs_sync_inodes_ag and xfs_qm_dqrele_all_inodes() can find inodes that are still undergoing initialisation. Avoid them by checking for the the XFS_INEW() flag once we have a reference on the inode. This flag is cleared once the inode is properly initialised. SGI-PV: 987246 Signed-off-by: Dave Chinner <david@fromorbit.com> Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Diffstat (limited to 'fs/xfs/quota')
-rw-r--r--fs/xfs/quota/xfs_qm_syscalls.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/xfs/quota/xfs_qm_syscalls.c b/fs/xfs/quota/xfs_qm_syscalls.c
index 2c57a6eaff3..68139b38aed 100644
--- a/fs/xfs/quota/xfs_qm_syscalls.c
+++ b/fs/xfs/quota/xfs_qm_syscalls.c
@@ -1080,6 +1080,12 @@ xfs_qm_dqrele_inodes_ag(
}
read_unlock(&pag->pag_ici_lock);
+ /* avoid new inodes though we shouldn't find any here */
+ if (xfs_iflags_test(ip, XFS_INEW)) {
+ IRELE(ip);
+ continue;
+ }
+
xfs_ilock(ip, XFS_ILOCK_EXCL);
if ((flags & XFS_UQUOTA_ACCT) && ip->i_udquot) {
xfs_qm_dqrele(ip->i_udquot);