diff options
author | Ted Unangst <tedu@cvs.openbsd.org> | 2003-02-25 09:48:34 +0000 |
---|---|---|
committer | Ted Unangst <tedu@cvs.openbsd.org> | 2003-02-25 09:48:34 +0000 |
commit | eb4b645d9c5e20fcc435c2250c7e312d1ec91c88 (patch) | |
tree | f489ce1506348b77a9501662c271df7f61c0228c | |
parent | d0df7d846f046b91d23d804f7f3fa78e6563d9bd (diff) |
set *vpp to NULL on entry. this provides a good example for other fs.
ok art@
-rw-r--r-- | sys/kern/vfs_cache.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index 0f0ec577101..43d8982d2a8 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_cache.c,v 1.9 2003/01/31 17:37:50 art Exp $ */ +/* $OpenBSD: vfs_cache.c,v 1.10 2003/02/25 09:48:33 tedu Exp $ */ /* $NetBSD: vfs_cache.c,v 1.13 1996/02/04 02:18:09 christos Exp $ */ /* @@ -109,15 +109,15 @@ cache_lookup(dvp, vpp, cnp) u_long vpid; int error; + *vpp = NULL; + if (!doingcache) { cnp->cn_flags &= ~MAKEENTRY; - *vpp = NULL; return (-1); } if (cnp->cn_namelen > NCHNAMLEN) { nchstats.ncs_long++; cnp->cn_flags &= ~MAKEENTRY; - *vpp = NULL; return (-1); } @@ -132,7 +132,6 @@ cache_lookup(dvp, vpp, cnp) } if (ncp == 0) { nchstats.ncs_miss++; - *vpp = NULL; return (-1); } if ((cnp->cn_flags & MAKEENTRY) == 0) { @@ -217,7 +216,6 @@ cache_lookup(dvp, vpp, cnp) return (error); cnp->cn_flags &= ~PDIRUNLOCK; } - *vpp = NULL; return (-1); } @@ -248,7 +246,6 @@ remove: } #endif TAILQ_INSERT_HEAD(&nclruhead, ncp, nc_lru); - *vpp = NULL; return (-1); } |