Module Name: src
Committed By: riastradh
Date: Sun Mar 19 10:21:02 UTC 2017
Modified Files:
src/sys/sys: namei.src
Log Message:
Fix locking comments.
Forgot to save my Emacs buffer before last commit.
To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/sys/sys/namei.src
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/sys/namei.src
diff -u src/sys/sys/namei.src:1.39 src/sys/sys/namei.src:1.40
--- src/sys/sys/namei.src:1.39 Sat Mar 18 21:03:28 2017
+++ src/sys/sys/namei.src Sun Mar 19 10:21:02 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: namei.src,v 1.39 2017/03/18 21:03:28 riastradh Exp $ */
+/* $NetBSD: namei.src,v 1.40 2017/03/19 10:21:02 riastradh Exp $ */
/*
* Copyright (c) 1985, 1989, 1991, 1993
@@ -207,13 +207,15 @@ NAMEIFL PARAMASK 0x02ee300 /* mask of pa
* - stable after initialization
* L namecache_lock
* C struct nchcpu::cpu_lock
+ * L/C insert/delete needs L and C, read needs L or any C,
+ * must hold L and all C after (or during) delete before free
* N struct namecache::nc_lock
*/
struct namecache {
- LIST_ENTRY(namecache) nc_hash; /* L hash chain */
+ LIST_ENTRY(namecache) nc_hash; /* L/C hash chain */
LIST_ENTRY(namecache) nc_vhash; /* L directory hash chain */
- struct vnode *nc_dvp; /* - vnode of parent of name */
- struct vnode *nc_vp; /* - vnode the name refers to */
+ struct vnode *nc_dvp; /* N vnode of parent of name */
+ struct vnode *nc_vp; /* N vnode the name refers to */
int nc_flags; /* - copy of componentname ISWHITEOUT */
char nc_nlen; /* - length of name */
char nc_name[NCHNAMLEN]; /* - segment name */