From fdac24081ed02771f8c0e014152299266d7aa273 Mon Sep 17 00:00:00 2001 From: pooka Date: Sun, 7 Jan 2007 20:43:59 +0000 Subject: [PATCH] Restore name caching behaviour accidentally removed in rev 1.73, using variation suggested by yamt on tech-kern. XXX: The exception is that this doesn't any longer prevent caching of RENAME, which was implied in a weird weird way previously. But that's handled by the callers currently. --- sys/kern/vfs_lookup.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c index 960db4cf7f44..93de7497c527 100644 --- a/sys/kern/vfs_lookup.c +++ b/sys/kern/vfs_lookup.c @@ -1,4 +1,4 @@ -/* $NetBSD: vfs_lookup.c,v 1.77 2006/12/27 23:21:02 chs Exp $ */ +/* $NetBSD: vfs_lookup.c,v 1.78 2007/01/07 20:43:59 pooka Exp $ */ /* * Copyright (c) 1982, 1986, 1989, 1993 @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: vfs_lookup.c,v 1.77 2006/12/27 23:21:02 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vfs_lookup.c,v 1.78 2007/01/07 20:43:59 pooka Exp $"); #include "opt_ktrace.h" #include "opt_systrace.h" @@ -527,7 +527,7 @@ lookup(struct nameidata *ndp) * Setup: break out flag bits into variables. */ docache = (cnp->cn_flags & NOCACHE) ^ NOCACHE; - if (cnp->cn_nameiop != CREATE) + if (cnp->cn_nameiop == DELETE) docache = 0; rdonly = cnp->cn_flags & RDONLY; ndp->ni_dvp = NULL;