aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_iget.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-12-16 16:29:39 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-12-16 16:29:39 -0500
commitbea4c899f2b5fad80099aea979780ef19f9b1987 (patch)
tree65130f4bc91b92e72498fc58bf895d35f2ebf0f2 /fs/xfs/xfs_iget.c
parent73efc4681cb5e3c8807daf106f001e7f0798d8a0 (diff)
parent3fc98b1ac036675b95f6e3fafd5ef147b97d4d30 (diff)
Merge branch 'for-linus' of git://oss.sgi.com/xfs/xfs
* 'for-linus' of git://oss.sgi.com/xfs/xfs: XFS: Free buffer pages array unconditionally xfs: kill xfs_bmbt_rec_32/64 types xfs: improve metadata I/O merging in the elevator xfs: check for not fully initialized inodes in xfs_ireclaim
Diffstat (limited to 'fs/xfs/xfs_iget.c')
-rw-r--r--fs/xfs/xfs_iget.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/fs/xfs/xfs_iget.c b/fs/xfs/xfs_iget.c
index f5c904a10c11..0de36c2a46f1 100644
--- a/fs/xfs/xfs_iget.c
+++ b/fs/xfs/xfs_iget.c
@@ -478,17 +478,21 @@ xfs_ireclaim(
478{ 478{
479 struct xfs_mount *mp = ip->i_mount; 479 struct xfs_mount *mp = ip->i_mount;
480 struct xfs_perag *pag; 480 struct xfs_perag *pag;
481 xfs_agino_t agino = XFS_INO_TO_AGINO(mp, ip->i_ino);
481 482
482 XFS_STATS_INC(xs_ig_reclaims); 483 XFS_STATS_INC(xs_ig_reclaims);
483 484
484 /* 485 /*
485 * Remove the inode from the per-AG radix tree. It doesn't matter 486 * Remove the inode from the per-AG radix tree.
486 * if it was never added to it because radix_tree_delete can deal 487 *
487 * with that case just fine. 488 * Because radix_tree_delete won't complain even if the item was never
489 * added to the tree assert that it's been there before to catch
490 * problems with the inode life time early on.
488 */ 491 */
489 pag = xfs_get_perag(mp, ip->i_ino); 492 pag = xfs_get_perag(mp, ip->i_ino);
490 write_lock(&pag->pag_ici_lock); 493 write_lock(&pag->pag_ici_lock);
491 radix_tree_delete(&pag->pag_ici_root, XFS_INO_TO_AGINO(mp, ip->i_ino)); 494 if (!radix_tree_delete(&pag->pag_ici_root, agino))
495 ASSERT(0);
492 write_unlock(&pag->pag_ici_lock); 496 write_unlock(&pag->pag_ici_lock);
493 xfs_put_perag(mp, pag); 497 xfs_put_perag(mp, pag);
494 498