diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-06 14:32:21 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-06 14:32:21 -0500 |
commit | 66ce3cf84deba6cc71dcf43c9d56a4278e5f712d (patch) | |
tree | 7580bcc42fc7c52620b98d78ebdc654bd7ed83ea /fs/xfs/xfs_iget.c | |
parent | 05c5cb31ec47cacf38db56d9efaa37ca9d473132 (diff) | |
parent | 9b1f56d60acfd634728f91f34922066c6f80ede6 (diff) |
Merge branch 'for-linus' of git://oss.sgi.com/xfs/xfs
* 'for-linus' of git://oss.sgi.com/xfs/xfs: (21 commits)
xfs: return inode fork offset in bulkstat for fsr
xfs: Increase the default size of the reserved blocks pool
xfs: truncate delalloc extents when IO fails in writeback
xfs: check for more work before sleeping in xfssyncd
xfs: Fix a build warning in xfs_aops.c
xfs: fix locking for inode cache radix tree tag updates
xfs: remove xfs_ipin/xfs_iunpin
xfs: cleanup xfs_iunpin_wait/xfs_iunpin_nowait
xfs: kill xfs_lrw.h
xfs: factor common xfs_trans_bjoin code
xfs: stop passing opaque handles to xfs_log.c routines
xfs: split xfs_bmap_btalloc
xfs: fix xfs_fsblock_t tracing
xfs: fix inode pincount check in fsync
xfs: Non-blocking inode locking in IO completion
xfs: implement optimized fdatasync
xfs: remove wrapper for the fsync file operation
xfs: remove wrappers for read/write file operations
xfs: merge xfs_lrw.c into xfs_file.c
xfs: fix dquota trace format
...
Diffstat (limited to 'fs/xfs/xfs_iget.c')
-rw-r--r-- | fs/xfs/xfs_iget.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/fs/xfs/xfs_iget.c b/fs/xfs/xfs_iget.c index e281eb4a1c49..6845db90818f 100644 --- a/fs/xfs/xfs_iget.c +++ b/fs/xfs/xfs_iget.c | |||
@@ -190,13 +190,12 @@ xfs_iget_cache_hit( | |||
190 | trace_xfs_iget_reclaim(ip); | 190 | trace_xfs_iget_reclaim(ip); |
191 | 191 | ||
192 | /* | 192 | /* |
193 | * We need to set XFS_INEW atomically with clearing the | 193 | * We need to set XFS_IRECLAIM to prevent xfs_reclaim_inode |
194 | * reclaimable tag so that we do have an indicator of the | 194 | * from stomping over us while we recycle the inode. We can't |
195 | * inode still being initialized. | 195 | * clear the radix tree reclaimable tag yet as it requires |
196 | * pag_ici_lock to be held exclusive. | ||
196 | */ | 197 | */ |
197 | ip->i_flags |= XFS_INEW; | 198 | ip->i_flags |= XFS_IRECLAIM; |
198 | ip->i_flags &= ~XFS_IRECLAIMABLE; | ||
199 | __xfs_inode_clear_reclaim_tag(mp, pag, ip); | ||
200 | 199 | ||
201 | spin_unlock(&ip->i_flags_lock); | 200 | spin_unlock(&ip->i_flags_lock); |
202 | read_unlock(&pag->pag_ici_lock); | 201 | read_unlock(&pag->pag_ici_lock); |
@@ -216,7 +215,15 @@ xfs_iget_cache_hit( | |||
216 | trace_xfs_iget_reclaim(ip); | 215 | trace_xfs_iget_reclaim(ip); |
217 | goto out_error; | 216 | goto out_error; |
218 | } | 217 | } |
218 | |||
219 | write_lock(&pag->pag_ici_lock); | ||
220 | spin_lock(&ip->i_flags_lock); | ||
221 | ip->i_flags &= ~(XFS_IRECLAIMABLE | XFS_IRECLAIM); | ||
222 | ip->i_flags |= XFS_INEW; | ||
223 | __xfs_inode_clear_reclaim_tag(mp, pag, ip); | ||
219 | inode->i_state = I_NEW; | 224 | inode->i_state = I_NEW; |
225 | spin_unlock(&ip->i_flags_lock); | ||
226 | write_unlock(&pag->pag_ici_lock); | ||
220 | } else { | 227 | } else { |
221 | /* If the VFS inode is being torn down, pause and try again. */ | 228 | /* If the VFS inode is being torn down, pause and try again. */ |
222 | if (!igrab(inode)) { | 229 | if (!igrab(inode)) { |