SOURCES (LINUX_2_6): kernel-small_fixes.patch - fix xfs hang when project q...

arekm arekm at pld-linux.org
Thu Dec 4 09:16:43 CET 2008


Author: arekm                        Date: Thu Dec  4 08:16:43 2008 GMT
Module: SOURCES                       Tag: LINUX_2_6
---- Log message:
- fix xfs hang when project quota used and rename() issued

---- Files affected:
SOURCES:
   kernel-small_fixes.patch (1.1.2.11 -> 1.1.2.12) 

---- Diffs:

================================================================
Index: SOURCES/kernel-small_fixes.patch
diff -u SOURCES/kernel-small_fixes.patch:1.1.2.11 SOURCES/kernel-small_fixes.patch:1.1.2.12
--- SOURCES/kernel-small_fixes.patch:1.1.2.11	Thu Dec  4 01:27:11 2008
+++ SOURCES/kernel-small_fixes.patch	Thu Dec  4 09:16:37 2008
@@ -194,3 +194,33 @@
  
  #include "squashfs.h"
  
+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: Arkadiusz Miskiewicz <arekm at maven.pl>
+Signed-off-by: Dave Chinner <david at fromorbit.com>
+---
+ 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 d700dac..c903130 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;
+ 	}
+
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/kernel-small_fixes.patch?r1=1.1.2.11&r2=1.1.2.12&f=u



More information about the pld-cvs-commit mailing list