[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>
This commit is contained in:
Dave Chinner
2008-11-10 17:13:23 +11:00
committed by Lachlan McIlroy
parent cb4f0d1d42
commit 6307091fe6
3 changed files with 9 additions and 3 deletions

View File

@@ -117,8 +117,9 @@ xfs_sync_inodes_ag(
}
read_unlock(&pag->pag_ici_lock);
/* bad inodes are dealt with elsewhere */
if (is_bad_inode(inode)) {
/* avoid new or bad inodes */
if (is_bad_inode(inode) ||
xfs_iflags_test(ip, XFS_INEW)) {
IRELE(ip);
continue;
}