提交 8241f7f9 编写于 作者: D Darrick J. Wong

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: NDarrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: NBrian Foster <bfoster@redhat.com>
上级 19957a18
...@@ -394,8 +394,6 @@ xfs_qm_dqalloc( ...@@ -394,8 +394,6 @@ xfs_qm_dqalloc(
error1: error1:
xfs_defer_cancel(&dfops); xfs_defer_cancel(&dfops);
error0: error0:
xfs_iunlock(quotip, XFS_ILOCK_EXCL);
return error; return error;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册