xfs: lock rt summary inode on allocation
authorDave Chinner <dchinner@redhat.com>
Sun, 7 Feb 2016 23:46:51 +0000 (10:46 +1100)
committerDave Chinner <david@fromorbit.com>
Sun, 7 Feb 2016 23:46:51 +0000 (10:46 +1100)
commit4b680afb42b9e1b504444583098401a00e63ed3c
tree6170a1d972054795a8a38afa7404dacb1230eaef
parent36f90b0a2ddd60823fe193a85e60ff1906c2a9b3
xfs: lock rt summary inode on allocation

RT allocation can fail on a debug kernel with:

XFS: Assertion failed: xfs_isilocked(ip, XFS_ILOCK_SHARED|XFS_ILOCK_EXCL), file: fs/xfs/libxfs/xfs_bmap.c, line: 4039

When modifying the summary inode during allocation. This occurs
because the summary inode is never locked, and xfs_bmapi_*
operations expect it to be locked. The summary inode is effectively
protected byt he lock on the bitmap inode, so this really is only a
debug kernel issue.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Tested-by: Ross Zwisler <ross.zwisler@linux.intel.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
fs/xfs/xfs_bmap_util.c