summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_lookup.c
diff options
context:
space:
mode:
authordfr <dfr@FreeBSD.org>1997-04-04 17:46:21 +0000
committerdfr <dfr@FreeBSD.org>1997-04-04 17:46:21 +0000
commit60008c7902ffea9987742942288eb83c2dbdd15e (patch)
tree590bf5529562a70c9080bde604b60fd21002126b /sys/kern/vfs_lookup.c
parent1428ad29019cc6f5eab10624e7ef3316fce39757 (diff)
downloadFreeBSD-src-60008c7902ffea9987742942288eb83c2dbdd15e.zip
FreeBSD-src-60008c7902ffea9987742942288eb83c2dbdd15e.tar.gz
Add a function vop_sharedlock which a copy of vop_nolock without the
implementation #ifdef out. This can be used for now by NFS. As soon as all the other filesystems' locking is fixed, this can go away. Print the vnode address in vprint for easier debugging.
Diffstat (limited to 'sys/kern/vfs_lookup.c')
-rw-r--r--sys/kern/vfs_lookup.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c
index 0c04b01..72da093 100644
--- a/sys/kern/vfs_lookup.c
+++ b/sys/kern/vfs_lookup.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)vfs_lookup.c 8.4 (Berkeley) 2/16/94
- * $Id$
+ * $Id: vfs_lookup.c,v 1.16 1997/02/22 09:39:33 peter Exp $
*/
#include "opt_ktrace.h"
@@ -409,6 +409,7 @@ dirloop:
unionlookup:
ndp->ni_dvp = dp;
ndp->ni_vp = NULL;
+ ASSERT_VOP_LOCKED(dp, "lookup");
if (error = VOP_LOOKUP(dp, &ndp->ni_vp, cnp)) {
#ifdef DIAGNOSTIC
if (ndp->ni_vp != NULL)
@@ -458,6 +459,8 @@ unionlookup:
printf("found\n");
#endif
+ ASSERT_VOP_LOCKED(ndp->ni_vp, "lookup");
+
/*
* Take into account any additional components consumed by
* the underlying filesystem.
@@ -516,6 +519,9 @@ nextname:
cnp->cn_nameptr++;
ndp->ni_pathlen--;
}
+ if (ndp->ni_dvp != ndp->ni_vp) {
+ ASSERT_VOP_UNLOCKED(ndp->ni_dvp, "lookup");
+ }
vrele(ndp->ni_dvp);
goto dirloop;
}
OpenPOWER on IntegriCloud