pseudofs_vncache.c (105165) | pseudofs_vncache.c (109623) |
---|---|
1/*- 2 * Copyright (c) 2001 Dag-Erling Co�dan Sm�rgrav 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * | 1/*- 2 * Copyright (c) 2001 Dag-Erling Co�dan Sm�rgrav 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * |
28 * $FreeBSD: head/sys/fs/pseudofs/pseudofs_vncache.c 105165 2002-10-15 18:51:02Z phk $ | 28 * $FreeBSD: head/sys/fs/pseudofs/pseudofs_vncache.c 109623 2003-01-21 08:56:16Z alfred $ |
29 */ 30 31#include <sys/param.h> 32#include <sys/kernel.h> 33#include <sys/systm.h> 34#include <sys/lock.h> 35#include <sys/malloc.h> 36#include <sys/mutex.h> --- 90 unchanged lines hidden (view full) --- 127 /* XXX if this can happen, we're in trouble */ 128 break; 129 } 130 } 131 mtx_unlock(&pfs_vncache_mutex); 132 ++pfs_vncache_misses; 133 134 /* nope, get a new one */ | 29 */ 30 31#include <sys/param.h> 32#include <sys/kernel.h> 33#include <sys/systm.h> 34#include <sys/lock.h> 35#include <sys/malloc.h> 36#include <sys/mutex.h> --- 90 unchanged lines hidden (view full) --- 127 /* XXX if this can happen, we're in trouble */ 128 break; 129 } 130 } 131 mtx_unlock(&pfs_vncache_mutex); 132 ++pfs_vncache_misses; 133 134 /* nope, get a new one */ |
135 MALLOC(pvd, struct pfs_vdata *, sizeof *pvd, M_PFSVNCACHE, M_WAITOK); | 135 MALLOC(pvd, struct pfs_vdata *, sizeof *pvd, M_PFSVNCACHE, 0); |
136 if (++pfs_vncache_entries > pfs_vncache_maxentries) 137 pfs_vncache_maxentries = pfs_vncache_entries; 138 error = getnewvnode("pseudofs", mp, pfs_vnodeop_p, vpp); 139 if (error) { 140 FREE(pvd, M_PFSVNCACHE); 141 return (error); 142 } 143 pvd->pvd_pn = pn; --- 135 unchanged lines hidden --- | 136 if (++pfs_vncache_entries > pfs_vncache_maxentries) 137 pfs_vncache_maxentries = pfs_vncache_entries; 138 error = getnewvnode("pseudofs", mp, pfs_vnodeop_p, vpp); 139 if (error) { 140 FREE(pvd, M_PFSVNCACHE); 141 return (error); 142 } 143 pvd->pvd_pn = pn; --- 135 unchanged lines hidden --- |