diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-06-27 12:01:29 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-06-27 12:01:29 -0400 |
commit | 4699d4423c07a1db35ea9453eac3a07e818338f9 (patch) | |
tree | a16641f1a1ef5d4a03122d58a1a4ff6514d21b4f /fs/xfs/xfs_iget.c | |
parent | 375ac3e09640fb16b6e6f1a1f1ee8aec30183fdf (diff) | |
parent | 4a33821236f2ef3af0081e8a5eec1301cbed3125 (diff) |
Merge branch 'for-linus' of git://oss.sgi.com/xfs/xfs
* 'for-linus' of git://oss.sgi.com/xfs/xfs:
xfs: prevent bogus assert when trying to remove non-existent attribute
xfs: clear XFS_IDIRTY_RELEASE on truncate down
xfs: reset inode per-lifetime state when recycling it
Diffstat (limited to 'fs/xfs/xfs_iget.c')
-rw-r--r-- | fs/xfs/xfs_iget.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/fs/xfs/xfs_iget.c b/fs/xfs/xfs_iget.c index cb9b6d1469f7..3631783b2b53 100644 --- a/fs/xfs/xfs_iget.c +++ b/fs/xfs/xfs_iget.c | |||
@@ -253,16 +253,21 @@ xfs_iget_cache_hit( | |||
253 | rcu_read_lock(); | 253 | rcu_read_lock(); |
254 | spin_lock(&ip->i_flags_lock); | 254 | spin_lock(&ip->i_flags_lock); |
255 | 255 | ||
256 | ip->i_flags &= ~XFS_INEW; | 256 | ip->i_flags &= ~(XFS_INEW | XFS_IRECLAIM); |
257 | ip->i_flags |= XFS_IRECLAIMABLE; | 257 | ASSERT(ip->i_flags & XFS_IRECLAIMABLE); |
258 | __xfs_inode_set_reclaim_tag(pag, ip); | ||
259 | trace_xfs_iget_reclaim_fail(ip); | 258 | trace_xfs_iget_reclaim_fail(ip); |
260 | goto out_error; | 259 | goto out_error; |
261 | } | 260 | } |
262 | 261 | ||
263 | spin_lock(&pag->pag_ici_lock); | 262 | spin_lock(&pag->pag_ici_lock); |
264 | spin_lock(&ip->i_flags_lock); | 263 | spin_lock(&ip->i_flags_lock); |
265 | ip->i_flags &= ~(XFS_IRECLAIMABLE | XFS_IRECLAIM); | 264 | |
265 | /* | ||
266 | * Clear the per-lifetime state in the inode as we are now | ||
267 | * effectively a new inode and need to return to the initial | ||
268 | * state before reuse occurs. | ||
269 | */ | ||
270 | ip->i_flags &= ~XFS_IRECLAIM_RESET_FLAGS; | ||
266 | ip->i_flags |= XFS_INEW; | 271 | ip->i_flags |= XFS_INEW; |
267 | __xfs_inode_clear_reclaim_tag(mp, pag, ip); | 272 | __xfs_inode_clear_reclaim_tag(mp, pag, ip); |
268 | inode->i_state = I_NEW; | 273 | inode->i_state = I_NEW; |