Commit 6a0775a9 authored by Dave Chinner's avatar Dave Chinner Committed by Lachlan McIlroy

[XFS] Fix hang after disallowed rename across directory quota domains

When project quota is active and is being used for directory tree
quota control, we disallow rename outside the current directory
tree. This requires a check to be made after all the inodes
involved in the rename are locked. We fail to unlock the inodes
correctly if we disallow the rename when the target is outside the
current directory tree. This results in a hang on the next access
to the inodes involved in failed rename.
Reported-by: default avatarArkadiusz Miskiewicz <arekm@maven.pl>
Signed-off-by: default avatarDave Chinner <david@fromorbit.com>
Tested-by: default avatarArkadiusz Miskiewicz <arekm@maven.pl>
Signed-off-by: default avatarLachlan McIlroy <lachlan@sgi.com>
parent 8bb57320
......@@ -212,7 +212,7 @@ xfs_rename(
if (unlikely((target_dp->i_d.di_flags & XFS_DIFLAG_PROJINHERIT) &&
(target_dp->i_d.di_projid != src_ip->i_d.di_projid))) {
error = XFS_ERROR(EXDEV);
xfs_rename_unlock4(inodes, XFS_ILOCK_SHARED);
xfs_rename_unlock4(inodes, XFS_ILOCK_EXCL);
xfs_trans_cancel(tp, cancel_flags);
goto std_return;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment