pseudofs_vncache.c (175294) | pseudofs_vncache.c (176519) |
---|---|
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 --- 13 unchanged lines hidden (view full) --- 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 29#include <sys/cdefs.h> | 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 --- 13 unchanged lines hidden (view full) --- 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 29#include <sys/cdefs.h> |
30__FBSDID("$FreeBSD: head/sys/fs/pseudofs/pseudofs_vncache.c 175294 2008-01-13 14:44:15Z attilio $"); | 30__FBSDID("$FreeBSD: head/sys/fs/pseudofs/pseudofs_vncache.c 176519 2008-02-24 16:38:58Z attilio $"); |
31 32#include "opt_pseudofs.h" 33 34#include <sys/param.h> 35#include <sys/kernel.h> 36#include <sys/systm.h> 37#include <sys/eventhandler.h> 38#include <sys/lock.h> --- 152 unchanged lines hidden (view full) --- 191 } 192 /* 193 * Propagate flag through to vnode so users know it can change 194 * if the process changes (i.e. execve) 195 */ 196 if ((pn->pn_flags & PFS_PROCDEP) != 0) 197 (*vpp)->v_vflag |= VV_PROCDEP; 198 pvd->pvd_vnode = *vpp; | 31 32#include "opt_pseudofs.h" 33 34#include <sys/param.h> 35#include <sys/kernel.h> 36#include <sys/systm.h> 37#include <sys/eventhandler.h> 38#include <sys/lock.h> --- 152 unchanged lines hidden (view full) --- 191 } 192 /* 193 * Propagate flag through to vnode so users know it can change 194 * if the process changes (i.e. execve) 195 */ 196 if ((pn->pn_flags & PFS_PROCDEP) != 0) 197 (*vpp)->v_vflag |= VV_PROCDEP; 198 pvd->pvd_vnode = *vpp; |
199 (*vpp)->v_vnlock->lk_flags |= LK_CANRECURSE; | 199 VN_LOCK_AREC(*vpp); |
200 vn_lock(*vpp, LK_EXCLUSIVE | LK_RETRY); 201 error = insmntque(*vpp, mp); 202 if (error != 0) { 203 mtx_lock(&pfs_vncache_mutex); 204 --pfs_vncache_entries; 205 mtx_unlock(&pfs_vncache_mutex); 206 FREE(pvd, M_PFSVNCACHE); 207 *vpp = NULLVP; --- 101 unchanged lines hidden --- | 200 vn_lock(*vpp, LK_EXCLUSIVE | LK_RETRY); 201 error = insmntque(*vpp, mp); 202 if (error != 0) { 203 mtx_lock(&pfs_vncache_mutex); 204 --pfs_vncache_entries; 205 mtx_unlock(&pfs_vncache_mutex); 206 FREE(pvd, M_PFSVNCACHE); 207 *vpp = NULLVP; --- 101 unchanged lines hidden --- |