Source-Changes-HG archive

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

[src/trunk]: src/sys/kern Back out previous.



details:   https://anonhg.NetBSD.org/src/rev/5a3fe3544ce2
branches:  trunk
changeset: 823219:5a3fe3544ce2
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Apr 16 16:48:08 2017 +0000

description:
Back out previous.

Breaks file systems for which VOP_UNLOCK doesn't work on a reclaimed
vnode.

The only case in tree right now is sys/fs/union -- most file systems
use genfs_unlock, which does work on a reclaimed vnode.

Maybe we can work around this -- and still enable VOP_RECLAIM's
callees to assert lock ownership -- by having VOP_RECLAIM unlock the
vnode instead.

diffstat:

 sys/kern/vfs_vnode.c  |  6 +++---
 sys/kern/vnode_if.src |  6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diffs (53 lines):

diff -r 1e36eb0b3524 -r 5a3fe3544ce2 sys/kern/vfs_vnode.c
--- a/sys/kern/vfs_vnode.c      Sun Apr 16 15:52:43 2017 +0000
+++ b/sys/kern/vfs_vnode.c      Sun Apr 16 16:48:08 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vfs_vnode.c,v 1.84 2017/04/15 23:16:53 riastradh Exp $ */
+/*     $NetBSD: vfs_vnode.c,v 1.85 2017/04/16 16:48:08 riastradh Exp $ */
 
 /*-
  * Copyright (c) 1997-2011 The NetBSD Foundation, Inc.
@@ -156,7 +156,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_vnode.c,v 1.84 2017/04/15 23:16:53 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_vnode.c,v 1.85 2017/04/16 16:48:08 riastradh Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -1554,10 +1554,10 @@
         * Note that the VOP_INACTIVE will not unlock the vnode.
         */
        VOP_INACTIVE(vp, &recycle);
+       VOP_UNLOCK(vp);
        if (VOP_RECLAIM(vp)) {
                vnpanic(vp, "%s: cannot reclaim", __func__);
        }
-       VOP_UNLOCK(vp);
 
        KASSERT(vp->v_data == NULL);
        KASSERT(vp->v_uobj.uo_npages == 0);
diff -r 1e36eb0b3524 -r 5a3fe3544ce2 sys/kern/vnode_if.src
--- a/sys/kern/vnode_if.src     Sun Apr 16 15:52:43 2017 +0000
+++ b/sys/kern/vnode_if.src     Sun Apr 16 16:48:08 2017 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: vnode_if.src,v 1.72 2017/04/15 23:16:53 riastradh Exp $
+#      $NetBSD: vnode_if.src,v 1.73 2017/04/16 16:48:08 riastradh Exp $
 #
 # Copyright (c) 1992, 1993
 #      The Regents of the University of California.  All rights reserved.
@@ -393,11 +393,11 @@
 };
 
 #
-#% reclaim    vp      L L L
+#% reclaim    vp      U U U
 #
 vop_reclaim {
        FSTRANS=NO
-       IN LOCKED=YES struct vnode *vp;
+       IN LOCKED=NO struct vnode *vp;
 };
 
 #



Home | Main Index | Thread Index | Old Index