Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Fix bogus fast path in vput.
details: https://anonhg.NetBSD.org/src/rev/c39e25e36b77
branches: trunk
changeset: 936995:c39e25e36b77
user: riastradh <riastradh%NetBSD.org@localhost>
date: Tue Aug 04 03:00:10 2020 +0000
description:
Fix bogus fast path in vput.
If we can't discern whether we have an exclusive or shared lock, then
just unlock and don't play fast and loose with pretending that we
have an exclusive lock will work -- it won't.
diffstat:
sys/kern/vfs_vnode.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (28 lines):
diff -r f2f07c24fa38 -r c39e25e36b77 sys/kern/vfs_vnode.c
--- a/sys/kern/vfs_vnode.c Tue Aug 04 02:09:57 2020 +0000
+++ b/sys/kern/vfs_vnode.c Tue Aug 04 03:00:10 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vfs_vnode.c,v 1.125 2020/06/14 00:20:17 ad Exp $ */
+/* $NetBSD: vfs_vnode.c,v 1.126 2020/08/04 03:00:10 riastradh Exp $ */
/*-
* Copyright (c) 1997-2011, 2019, 2020 The NetBSD Foundation, Inc.
@@ -148,7 +148,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vfs_vnode.c,v 1.125 2020/06/14 00:20:17 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vfs_vnode.c,v 1.126 2020/08/04 03:00:10 riastradh Exp $");
#ifdef _KERNEL_OPT
#include "opt_pax.h"
@@ -756,7 +756,8 @@
}
lktype = LK_NONE;
} else if ((vp->v_vflag & VV_LOCKSWORK) == 0) {
- lktype = LK_EXCLUSIVE;
+ VOP_UNLOCK(vp);
+ lktype = LK_NONE;
} else {
lktype = VOP_ISLOCKED(vp);
KASSERT(lktype != LK_NONE);
Home |
Main Index |
Thread Index |
Old Index