aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/linux-2.6/xfs_sync.c
diff options
context:
space:
mode:
authorDave Chinner <david@fromorbit.com>2008-11-10 01:13:23 -0500
committerLachlan McIlroy <lachlan@redback.melbourne.sgi.com>2008-11-10 01:13:23 -0500
commit6307091fe69ae74747298bdcaf43119ad67bda3a (patch)
treec1feb80479b7ae4ebcf9a4336e50dfd18aebcb38 /fs/xfs/linux-2.6/xfs_sync.c
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/linux-2.6/xfs_sync.c')
-rw-r--r--fs/xfs/linux-2.6/xfs_sync.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/xfs/linux-2.6/xfs_sync.c b/fs/xfs/linux-2.6/xfs_sync.c
index fb5cca3df840..d12d31b86fa0 100644
--- a/fs/xfs/linux-2.6/xfs_sync.c
+++ b/fs/xfs/linux-2.6/xfs_sync.c
@@ -117,8 +117,9 @@ xfs_sync_inodes_ag(
117 } 117 }
118 read_unlock(&pag->pag_ici_lock); 118 read_unlock(&pag->pag_ici_lock);
119 119
120 /* bad inodes are dealt with elsewhere */ 120 /* avoid new or bad inodes */
121 if (is_bad_inode(inode)) { 121 if (is_bad_inode(inode) ||
122 xfs_iflags_test(ip, XFS_INEW)) {
122 IRELE(ip); 123 IRELE(ip);
123 continue; 124 continue;
124 } 125 }