diff options
Diffstat (limited to 'fs/xfs/xfs_iget.c')
-rw-r--r-- | fs/xfs/xfs_iget.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/xfs/xfs_iget.c b/fs/xfs/xfs_iget.c index 19dcfb2aac9a..37f22dad5f59 100644 --- a/fs/xfs/xfs_iget.c +++ b/fs/xfs/xfs_iget.c | |||
@@ -418,6 +418,15 @@ xfs_iget( | |||
418 | xfs_perag_t *pag; | 418 | xfs_perag_t *pag; |
419 | xfs_agino_t agino; | 419 | xfs_agino_t agino; |
420 | 420 | ||
421 | /* | ||
422 | * xfs_reclaim_inode() uses the ILOCK to ensure an inode | ||
423 | * doesn't get freed while it's being referenced during a | ||
424 | * radix tree traversal here. It assumes this function | ||
425 | * aqcuires only the ILOCK (and therefore it has no need to | ||
426 | * involve the IOLOCK in this synchronization). | ||
427 | */ | ||
428 | ASSERT((lock_flags & (XFS_IOLOCK_EXCL | XFS_IOLOCK_SHARED)) == 0); | ||
429 | |||
421 | /* reject inode numbers outside existing AGs */ | 430 | /* reject inode numbers outside existing AGs */ |
422 | if (!ino || XFS_INO_TO_AGNO(mp, ino) >= mp->m_sb.sb_agcount) | 431 | if (!ino || XFS_INO_TO_AGNO(mp, ino) >= mp->m_sb.sb_agcount) |
423 | return EINVAL; | 432 | return EINVAL; |