diff options
author | Thordur I. Bjornsson <thib@cvs.openbsd.org> | 2008-05-06 20:57:20 +0000 |
---|---|---|
committer | Thordur I. Bjornsson <thib@cvs.openbsd.org> | 2008-05-06 20:57:20 +0000 |
commit | ec171bfaf31bd925a66747b3508fb3524a36afe9 (patch) | |
tree | 66bd2567b0112a4fe1f06ca0871b02ee0b4954e0 /sys/kern/vfs_cache.c | |
parent | 1eed9bf6c704ac401ae8e0657f2ca1d96647174d (diff) |
Add a PR_ZERO flag for pools, to compliment the M_ZERO
malloc flag, does the same thing.
use it in a few places.
OK tedu@, "then go ahead. and don't forget the manpage (-:" miod@
Diffstat (limited to 'sys/kern/vfs_cache.c')
-rw-r--r-- | sys/kern/vfs_cache.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index c8c19b2098f..f11e4240b99 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vfs_cache.c,v 1.25 2007/06/21 12:05:14 pedro Exp $ */ +/* $OpenBSD: vfs_cache.c,v 1.26 2008/05/06 20:57:19 thib Exp $ */ /* $NetBSD: vfs_cache.c,v 1.13 1996/02/04 02:18:09 christos Exp $ */ /* @@ -345,8 +345,7 @@ cache_enter(struct vnode *dvp, struct vnode *vp, struct componentname *cnp) * Free the cache slot at head of lru chain. */ if (numcache < desiredvnodes) { - ncp = pool_get(&nch_pool, PR_WAITOK); - bzero((char *)ncp, sizeof *ncp); + ncp = pool_get(&nch_pool, PR_WAITOK|PR_ZERO); numcache++; } else if ((ncp = TAILQ_FIRST(&nclruhead)) != NULL) { TAILQ_REMOVE(&nclruhead, ncp, nc_lru); |