xfs: add lockdep annotations for the rt inodes

The rt bitmap and summary inodes do not participate in the normal inode
locking protocol.  Instead the rt bitmap inode can be locked in any
transaction involving rt allocations, and the both of the rt inodes can
be locked at the same time.  Add specific lockdep subclasses for the rt
inodes to prevent lockdep from blowing up.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alex Elder <aelder@sgi.com>
This commit is contained in:
Christoph Hellwig
2011-01-25 09:06:21 +00:00
committed by Alex Elder
parent 0d8b30ad19
commit 9681153b46
3 changed files with 26 additions and 15 deletions

View File

@@ -2371,7 +2371,7 @@ xfs_bmap_rtalloc(
* Lock out other modifications to the RT bitmap inode.
*/
error = xfs_trans_iget(mp, ap->tp, mp->m_sb.sb_rbmino, 0,
XFS_ILOCK_EXCL, &ip);
XFS_ILOCK_EXCL | XFS_ILOCK_RTBITMAP, &ip);
if (error)
return error;
ASSERT(ip == mp->m_rbmip);