Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Change vnode operation lookup to return the resulti...
details: https://anonhg.NetBSD.org/src/rev/2358ff14a3d8
branches: trunk
changeset: 326615:2358ff14a3d8
user: hannken <hannken%NetBSD.org@localhost>
date: Fri Feb 07 15:26:42 2014 +0000
description:
Change vnode operation lookup to return the resulting vnode *vpp unlocked.
Change cache_lookup() to return an unlocked vnode.
Discussed on tech-kern@
diffstat:
sys/kern/vnode_if.src | 20 +++++---------------
1 files changed, 5 insertions(+), 15 deletions(-)
diffs (41 lines):
diff -r eba560015d1f -r 2358ff14a3d8 sys/kern/vnode_if.src
--- a/sys/kern/vnode_if.src Fri Feb 07 11:51:00 2014 +0000
+++ b/sys/kern/vnode_if.src Fri Feb 07 15:26:42 2014 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: vnode_if.src,v 1.65 2014/01/23 10:11:55 hannken Exp $
+# $NetBSD: vnode_if.src,v 1.66 2014/02/07 15:26:42 hannken Exp $
#
# Copyright (c) 1992, 1993
# The Regents of the University of California. All rights reserved.
@@ -61,27 +61,17 @@
#
#% lookup dvp L L L
-#% lookup vpp - L -
+#% lookup vpp - U -
#
-# XXX - the lookup locking protocol defies simple description.
# Note especially that *vpp may equal dvp.
#
# More details:
-# There are three types of lookups: ".", ".." (ISDOTDOT), and other.
-# On successful lookup of ".", a reference is added to dvp, and it
-# is returned in *vpp.
-# To look up ISDOTDOT, dvp is unlocked, the ".." node is locked, and
-# then dvp is relocked. This preserves the protocol of always
-# locking nodes from root ("/") downward and prevents deadlock.
-# Other lookups find the named node (creating the vnode if needed) and
-# return it, locked, in *vpp.
+# All lookups find the named node (creating the vnode if needed) and
+# return it, referenced and unlocked, in *vpp.
# On failure, *vpp is NULL, and *dvp is left locked.
-#
-# *vpp is always locked on return if the operation succeeds.
-# Typically, if *vpp == dvp, you need to release twice, but
-# unlock only once.
#
vop_lookup {
+ VERSION 2
IN struct vnode *dvp;
OUT WILLMAKE struct vnode **vpp;
IN struct componentname *cnp;
Home |
Main Index |
Thread Index |
Old Index