Module Name:    src
Committed By:   riz
Date:           Thu Sep 13 22:27:43 UTC 2012

Modified Files:
        src/sys/ufs/ffs [netbsd-6]: ffs_vfsops.c

Log Message:
Pull up following revision(s) (requested by manu in ticket #553):
        sys/ufs/ffs/ffs_vfsops.c: revision 1.278
Stop extended attributes at the appropriate place so that unmount
does not fail with EBUSY on filesystem with extended attributes ensabled.


To generate a diff of this commit:
cvs rdiff -u -r1.275.2.1 -r1.275.2.2 src/sys/ufs/ffs/ffs_vfsops.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/ufs/ffs/ffs_vfsops.c
diff -u src/sys/ufs/ffs/ffs_vfsops.c:1.275.2.1 src/sys/ufs/ffs/ffs_vfsops.c:1.275.2.2
--- src/sys/ufs/ffs/ffs_vfsops.c:1.275.2.1	Mon May  7 03:01:12 2012
+++ src/sys/ufs/ffs/ffs_vfsops.c	Thu Sep 13 22:27:43 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: ffs_vfsops.c,v 1.275.2.1 2012/05/07 03:01:12 riz Exp $	*/
+/*	$NetBSD: ffs_vfsops.c,v 1.275.2.2 2012/09/13 22:27:43 riz Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ffs_vfsops.c,v 1.275.2.1 2012/05/07 03:01:12 riz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ffs_vfsops.c,v 1.275.2.2 2012/09/13 22:27:43 riz Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_ffs.h"
@@ -1464,12 +1464,6 @@ ffs_unmount(struct mount *mp, int mntfla
 		return error;
 	}
 #endif /* WAPBL */
-#ifdef UFS_EXTATTR
-	if (ump->um_fstype == UFS1) {
-		ufs_extattr_stop(mp, l);
-		ufs_extattr_uepm_destroy(&ump->um_extattr);
-	}
-#endif /* UFS_EXTATTR */
 
 	if (ump->um_devvp->v_type != VBAD)
 		ump->um_devvp->v_specmountpoint = NULL;
@@ -1517,6 +1511,14 @@ ffs_flushfiles(struct mount *mp, int fla
 	if ((error = quota2_umount(mp, flags)) != 0)
 		return (error);
 #endif
+#ifdef UFS_EXTATTR
+	if (ump->um_fstype == UFS1) {
+		if (ump->um_extattr.uepm_flags & UFS_EXTATTR_UEPM_STARTED)
+			ufs_extattr_stop(mp, l);
+		if (ump->um_extattr.uepm_flags & UFS_EXTATTR_UEPM_INITIALIZED)
+			ufs_extattr_uepm_destroy(&ump->um_extattr);
+	}
+#endif
 	if ((error = vflush(mp, 0, SKIPSYSTEM | flags)) != 0)
 		return (error);
 	ffs_snapshot_unmount(mp);

Reply via email to