From 11dbb7d2e44afb03dedff4d82a00a0fe030da9ad Mon Sep 17 00:00:00 2001 From: Dave Chinner Date: Mon, 10 Nov 2008 17:13:23 +1100 Subject: [PATCH] --- yaml --- r: 124879 b: refs/heads/master c: 6307091fe69ae74747298bdcaf43119ad67bda3a h: refs/heads/master i: 124877: b2a8612337f8fa97d5f0dc0b2c69f4bd37b5c2ee 124875: 57ba79ae1e5974a0074176a55bae79be33960cda 124871: 1a23a0524837f416d3b54c0700d82eaa48dc1c65 124863: 110aab591a9dfaa5196198afceee0ca0de630370 v: v3 --- [refs] | 2 +- trunk/fs/xfs/linux-2.6/xfs_iops.c | 1 - trunk/fs/xfs/linux-2.6/xfs_sync.c | 5 +++-- trunk/fs/xfs/quota/xfs_qm_syscalls.c | 6 ++++++ 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index c689f88dffcd..4b3aca45c213 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: cb4f0d1d4229f609f43c68acec69c7618ed72397 +refs/heads/master: 6307091fe69ae74747298bdcaf43119ad67bda3a diff --git a/trunk/fs/xfs/linux-2.6/xfs_iops.c b/trunk/fs/xfs/linux-2.6/xfs_iops.c index f78bc2215764..69c98cf32336 100644 --- a/trunk/fs/xfs/linux-2.6/xfs_iops.c +++ b/trunk/fs/xfs/linux-2.6/xfs_iops.c @@ -780,7 +780,6 @@ xfs_setup_inode( inode->i_ino = ip->i_ino; inode->i_state = I_NEW|I_LOCK; inode_add_to_lists(ip->i_mount->m_super, inode); - ASSERT(atomic_read(&inode->i_count) == 1); inode->i_mode = ip->i_d.di_mode; inode->i_nlink = ip->i_d.di_nlink; diff --git a/trunk/fs/xfs/linux-2.6/xfs_sync.c b/trunk/fs/xfs/linux-2.6/xfs_sync.c index fb5cca3df840..d12d31b86fa0 100644 --- a/trunk/fs/xfs/linux-2.6/xfs_sync.c +++ b/trunk/fs/xfs/linux-2.6/xfs_sync.c @@ -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; } diff --git a/trunk/fs/xfs/quota/xfs_qm_syscalls.c b/trunk/fs/xfs/quota/xfs_qm_syscalls.c index 2c57a6eaff36..68139b38aede 100644 --- a/trunk/fs/xfs/quota/xfs_qm_syscalls.c +++ b/trunk/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);