Module Name:    src
Committed By:   christos
Date:           Mon Aug 19 09:32:42 UTC 2019

Modified Files:
        src/sys/kern: vfs_mount.c

Log Message:
If we could not start extattr for some reason, don't advertise extattr in the
mount.


To generate a diff of this commit:
cvs rdiff -u -r1.70 -r1.71 src/sys/kern/vfs_mount.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/kern/vfs_mount.c
diff -u src/sys/kern/vfs_mount.c:1.70 src/sys/kern/vfs_mount.c:1.71
--- src/sys/kern/vfs_mount.c:1.70	Wed Feb 20 05:08:37 2019
+++ src/sys/kern/vfs_mount.c	Mon Aug 19 05:32:42 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: vfs_mount.c,v 1.70 2019/02/20 10:08:37 hannken Exp $	*/
+/*	$NetBSD: vfs_mount.c,v 1.71 2019/08/19 09:32:42 christos Exp $	*/
 
 /*-
  * Copyright (c) 1997-2011 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_mount.c,v 1.70 2019/02/20 10:08:37 hannken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_mount.c,v 1.71 2019/08/19 09:32:42 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -807,10 +807,11 @@ mount_domount(struct lwp *l, vnode_t **v
 	vfs_ref(mp);
 	(void) VFS_STATVFS(mp, &mp->mnt_stat);
 	error = VFS_START(mp, 0);
-       if (error) {
+	if (error) {
 		vrele(vp);
 	} else if (flags & MNT_EXTATTR) {
-		(void)start_extattr(mp);
+		if (start_extattr(mp) != 0)
+			mp->mnt_flag &= ~MNT_EXTATTR;
 	}
 	/* Drop reference held for VFS_START(). */
 	vfs_rele(mp);

Reply via email to