diff options
author | Dave Chinner <david@fromorbit.com> | 2008-12-04 09:09:34 +1100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-12-13 15:29:35 -0800 |
commit | b1e58876b39029fb4f1b49504ba01f5454428878 (patch) | |
tree | a9e40f99b5a4d21f556c083d78747633de6b901f /fs/xfs | |
parent | ec9ea180923639380683ebb52d135bc01959f2b1 (diff) | |
download | lwn-b1e58876b39029fb4f1b49504ba01f5454428878.tar.gz lwn-b1e58876b39029fb4f1b49504ba01f5454428878.zip |
XFS: Fix hang after disallowed rename across directory quota domains
commit 576a488a27f267af203f3ea69c700a1612335e9f upstream.
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: Arkadiusz Miskiewicz <arekm@maven.pl>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Tested-by: Arkadiusz Miskiewicz <arekm@maven.pl>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'fs/xfs')
-rw-r--r-- | fs/xfs/xfs_rename.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/xfs_rename.c b/fs/xfs/xfs_rename.c index d700dacdb10e..c903130be7fd 100644 --- a/fs/xfs/xfs_rename.c +++ b/fs/xfs/xfs_rename.c @@ -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; } |