diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2016-08-03 11:00:42 +1000 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2016-08-03 11:00:42 +1000 |
commit | f4a0660de34451e30f0bb8b65946b79c8bd375ca (patch) | |
tree | d0d43540b424754fb8bcb428961f9955fa06c67e /fs/xfs/xfs_bmap_util.c | |
parent | 3dadf901ddc0a1275b622b1a170557bd0d136862 (diff) | |
download | linux-f4a0660de34451e30f0bb8b65946b79c8bd375ca.tar.gz linux-f4a0660de34451e30f0bb8b65946b79c8bd375ca.tar.bz2 linux-f4a0660de34451e30f0bb8b65946b79c8bd375ca.zip |
xfs: fix locking of the rt bitmap/summary inodes
When we're deleting realtime extents, we need to lock the summary
inode in case we need to update the summary info to prevent an assert
on the rsumip inode lock on a debug kernel. While we're at it, fix
the locking annotations so that we avoid triggering lockdep warnings.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs/xfs_bmap_util.c')
-rw-r--r-- | fs/xfs/xfs_bmap_util.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/xfs/xfs_bmap_util.c b/fs/xfs/xfs_bmap_util.c index cd4a850564f2..998c3e69dd33 100644 --- a/fs/xfs/xfs_bmap_util.c +++ b/fs/xfs/xfs_bmap_util.c @@ -214,9 +214,9 @@ xfs_bmap_rtalloc( /* * Lock out modifications to both the RT bitmap and summary inodes */ - xfs_ilock(mp->m_rbmip, XFS_ILOCK_EXCL); + xfs_ilock(mp->m_rbmip, XFS_ILOCK_EXCL|XFS_ILOCK_RTBITMAP); xfs_trans_ijoin(ap->tp, mp->m_rbmip, XFS_ILOCK_EXCL); - xfs_ilock(mp->m_rsumip, XFS_ILOCK_EXCL); + xfs_ilock(mp->m_rsumip, XFS_ILOCK_EXCL|XFS_ILOCK_RTSUM); xfs_trans_ijoin(ap->tp, mp->m_rsumip, XFS_ILOCK_EXCL); /* |