Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/ufs/ffs Stop extended attributes at the appropriate plac...



details:   https://anonhg.NetBSD.org/src/rev/5e7ad4253d43
branches:  trunk
changeset: 781491:5e7ad4253d43
user:      manu <manu%NetBSD.org@localhost>
date:      Mon Sep 10 07:57:50 2012 +0000

description:
Stop extended attributes at the appropriate place so that unmount
does not fail with EBUSY on filesystem with extended attributes ensabled.

diffstat:

 sys/ufs/ffs/ffs_vfsops.c |  18 ++++++++++--------
 1 files changed, 10 insertions(+), 8 deletions(-)

diffs (46 lines):

diff -r 99a976e22836 -r 5e7ad4253d43 sys/ufs/ffs/ffs_vfsops.c
--- a/sys/ufs/ffs/ffs_vfsops.c  Mon Sep 10 07:47:07 2012 +0000
+++ b/sys/ufs/ffs/ffs_vfsops.c  Mon Sep 10 07:57:50 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ffs_vfsops.c,v 1.277 2012/04/29 22:54:00 chs Exp $     */
+/*     $NetBSD: ffs_vfsops.c,v 1.278 2012/09/10 07:57:50 manu 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.277 2012/04/29 22:54:00 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ffs_vfsops.c,v 1.278 2012/09/10 07:57:50 manu Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_ffs.h"
@@ -1491,12 +1491,6 @@
                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;
@@ -1544,6 +1538,14 @@
        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);



Home | Main Index | Thread Index | Old Index