Subject: Re: vfs namecache change
To: None <pooka@cs.hut.fi>
From: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
List: tech-kern
Date: 12/30/2006 08:52:58
> 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;

i prefer:

	if (cnp->cn_nameiop == DELETE)
		docache = 0;

YAMAMOTO Takashi