nfs_node.c (136927) | nfs_node.c (138290) |
---|---|
1/* 2 * Copyright (c) 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Rick Macklem at The University of Guelph. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 19 unchanged lines hidden (view full) --- 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 * 32 * @(#)nfs_node.c 8.6 (Berkeley) 5/22/95 33 */ 34 35#include <sys/cdefs.h> | 1/* 2 * Copyright (c) 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Rick Macklem at The University of Guelph. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 19 unchanged lines hidden (view full) --- 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 * 32 * @(#)nfs_node.c 8.6 (Berkeley) 5/22/95 33 */ 34 35#include <sys/cdefs.h> |
36__FBSDID("$FreeBSD: head/sys/nfsclient/nfs_node.c 136927 2004-10-24 20:03:41Z phk $"); | 36__FBSDID("$FreeBSD: head/sys/nfsclient/nfs_node.c 138290 2004-12-01 23:16:38Z phk $"); |
37 38#include <sys/param.h> 39#include <sys/systm.h> 40#include <sys/fnv_hash.h> 41#include <sys/lock.h> 42#include <sys/malloc.h> 43#include <sys/mount.h> 44#include <sys/namei.h> --- 185 unchanged lines hidden (view full) --- 230 /* 231 * Allocate before getnewvnode since doing so afterward 232 * might cause a bogus v_data pointer to get dereferenced 233 * elsewhere if zalloc should block. 234 */ 235 np = uma_zalloc(nfsnode_zone, M_WAITOK); 236 237 if (nmp->nm_flag & NFSMNT_NFSV4) | 37 38#include <sys/param.h> 39#include <sys/systm.h> 40#include <sys/fnv_hash.h> 41#include <sys/lock.h> 42#include <sys/malloc.h> 43#include <sys/mount.h> 44#include <sys/namei.h> --- 185 unchanged lines hidden (view full) --- 230 /* 231 * Allocate before getnewvnode since doing so afterward 232 * might cause a bogus v_data pointer to get dereferenced 233 * elsewhere if zalloc should block. 234 */ 235 np = uma_zalloc(nfsnode_zone, M_WAITOK); 236 237 if (nmp->nm_flag & NFSMNT_NFSV4) |
238 error = getnewvnode("nfs4", mntp, nfs4_vnodeop_p, &nvp); | 238 error = getnewvnode("nfs4", mntp, &nfs4_vnodeops, &nvp); |
239 else | 239 else |
240 error = getnewvnode("nfs", mntp, nfs_vnodeop_p, &nvp); | 240 error = getnewvnode("nfs", mntp, &nfs_vnodeops, &nvp); |
241 if (error) { 242 if (nfs_node_hash_lock < 0) 243 wakeup(&nfs_node_hash_lock); 244 nfs_node_hash_lock = 0; 245 *npp = 0; 246 uma_zfree(nfsnode_zone, np); 247 return (error); 248 } --- 112 unchanged lines hidden --- | 241 if (error) { 242 if (nfs_node_hash_lock < 0) 243 wakeup(&nfs_node_hash_lock); 244 nfs_node_hash_lock = 0; 245 *npp = 0; 246 uma_zfree(nfsnode_zone, np); 247 return (error); 248 } --- 112 unchanged lines hidden --- |