]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: don't iunlock the quota ip when quota block
authorDarrick J. Wong <darrick.wong@oracle.com>
Wed, 7 Mar 2018 01:08:30 +0000 (17:08 -0800)
committerDarrick J. Wong <darrick.wong@oracle.com>
Mon, 12 Mar 2018 03:27:56 +0000 (20:27 -0700)
commitadeccc99d8c9bcccdce40f98c2a6bfdb1512879d
treeed006995943eda89d93ec36d8a0571088805aed0
parente1368e59d9d9e86dbafffbe0c9b58b94dda89141
xfs: don't iunlock the quota ip when quota block

In xfs_qm_dqalloc, we join the locked quota inode to the transaction we
use to allocate blocks.  If the allocation or mapping fails, we're not
allowed to unlock the inode because the transaction code is in charge of
unlocking it for us.  Therefore, remove the iunlock call to avoid
blowing asserts about unbalanced locking + mount hang.

Found by corrupting the AGF and allocating space in the filesystem
(quotacheck) immediately after mount.  The upcoming agfl wrapping fixup
test will trigger this scenario.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
fs/xfs/xfs_dquot.c