Subject: vfs namecache change
To: None <tech-kern@netbsd.org>
From: Antti Kantee <pooka@cs.hut.fi>
List: tech-kern
Date: 12/29/2006 21:06:07
Hi,
Seems like the vfs name cache was accidentally(?) changed to not cache
anything else than CREATE operations for leaf components. The patch
restores old behaviour back, AFAICT. Of course I maybe don't agree with
saying what we want to say with the way we are saying it (house of cards,
anyone?), but a major rototillation will have to wait for another time.
look ok?
Index: vfs_lookup.c
===================================================================
RCS file: /cvsroot/src/sys/kern/vfs_lookup.c,v
retrieving revision 1.77
diff -u -r1.77 vfs_lookup.c
--- vfs_lookup.c 27 Dec 2006 23:21:02 -0000 1.77
+++ vfs_lookup.c 29 Dec 2006 19:02:46 -0000
@@ -527,7 +527,7 @@
* Setup: break out flag bits into variables.
*/
docache = (cnp->cn_flags & NOCACHE) ^ NOCACHE;
- if (cnp->cn_nameiop != CREATE)
+ if ((cnp->cn_flags & LOCKPARENT) && (cnp->cn_nameiop != CREATE))
docache = 0;
rdonly = cnp->cn_flags & RDONLY;
ndp->ni_dvp = NULL;
--
Antti Kantee <pooka@iki.fi> Of course he runs NetBSD
http://www.iki.fi/pooka/ http://www.NetBSD.org/
"la qualité la plus indispensable du cuisinier est l'exactitude"