Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Move VFS_EXTATTRCTL to mount_domount(). This makes...
details: https://anonhg.NetBSD.org/src/rev/c1e1f4576ae2
branches: trunk
changeset: 779179:c1e1f4576ae2
user: gson <gson%NetBSD.org@localhost>
date: Tue May 08 08:44:49 2012 +0000
description:
Move VFS_EXTATTRCTL to mount_domount(). This makes the
fs/puffs/t_fuzz:mountfuzz7, fs/puffs/t_fuzz:mountfuzz8,
and fs/zfs/t_zpool:create tests pass again. Patch from
manu, discussed on tech-kern and committed at his request.
diffstat:
sys/kern/vfs_mount.c | 14 +++++++++++---
sys/kern/vfs_syscalls.c | 23 ++---------------------
2 files changed, 13 insertions(+), 24 deletions(-)
diffs (92 lines):
diff -r c3ce04651c41 -r c1e1f4576ae2 sys/kern/vfs_mount.c
--- a/sys/kern/vfs_mount.c Tue May 08 05:15:45 2012 +0000
+++ b/sys/kern/vfs_mount.c Tue May 08 08:44:49 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vfs_mount.c,v 1.13 2012/03/13 18:40:55 elad Exp $ */
+/* $NetBSD: vfs_mount.c,v 1.14 2012/05/08 08:44:49 gson 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.13 2012/03/13 18:40:55 elad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_mount.c,v 1.14 2012/05/08 08:44:49 gson Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -83,6 +83,7 @@
#include <sys/module.h>
#include <sys/mount.h>
#include <sys/namei.h>
+#include <sys/extattr.h>
#include <sys/syscallargs.h>
#include <sys/sysctl.h>
#include <sys/systm.h>
@@ -739,8 +740,15 @@
vfs_unbusy(mp, true, NULL);
(void) VFS_STATVFS(mp, &mp->mnt_stat);
error = VFS_START(mp, 0);
- if (error)
+ if (error) {
vrele(vp);
+ } else if (flags & MNT_EXTATTR) {
+ error = VFS_EXTATTRCTL(vp->v_mountedhere,
+ EXTATTR_CMD_START, NULL, 0, NULL);
+ if (error)
+ printf("%s: failed to start extattr: error = %d\n",
+ vp->v_mountedhere->mnt_stat.f_mntonname, error);
+ }
/* Drop reference held for VFS_START(). */
vfs_destroy(mp);
*vpp = NULL;
diff -r c3ce04651c41 -r c1e1f4576ae2 sys/kern/vfs_syscalls.c
--- a/sys/kern/vfs_syscalls.c Tue May 08 05:15:45 2012 +0000
+++ b/sys/kern/vfs_syscalls.c Tue May 08 08:44:49 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vfs_syscalls.c,v 1.455 2012/05/02 20:48:29 rmind Exp $ */
+/* $NetBSD: vfs_syscalls.c,v 1.456 2012/05/08 08:44:49 gson Exp $ */
/*-
* Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.455 2012/05/02 20:48:29 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_syscalls.c,v 1.456 2012/05/08 08:44:49 gson Exp $");
#ifdef _KERNEL_OPT
#include "opt_fileassoc.h"
@@ -458,30 +458,11 @@
} else if (flags & MNT_UPDATE) {
error = mount_update(l, vp, path, flags, data_buf, &data_len);
} else {
- struct vnode *svp;
-
- /* Save vp as mount_domount sets it to NULL */
- vref(vp);
- svp = vp;
-
/* Locking is handled internally in mount_domount(). */
KASSERT(vfsopsrele == true);
error = mount_domount(l, &vp, vfsops, path, flags, data_buf,
&data_len);
vfsopsrele = false;
-
- if ((error == 0) && (flags & MNT_EXTATTR)) {
- KASSERT(svp->v_mountedhere != NULL);
-
- if (VFS_EXTATTRCTL(svp->v_mountedhere,
- EXTATTR_CMD_START,
- NULL, 0, NULL) != 0)
- printf("%s: failed to start extattr",
- svp->v_mountedhere->mnt_stat.f_mntonname);
- /* XXX remove flag */
- }
-
- vrele(svp);
}
done:
Home |
Main Index |
Thread Index |
Old Index