-/* $OpenBSD: nfs_node.c,v 1.40 2008/06/14 10:55:21 mk Exp $ */
+/* $OpenBSD: nfs_node.c,v 1.41 2008/08/08 20:40:24 blambert Exp $ */
/* $NetBSD: nfs_node.c,v 1.16 1996/02/18 11:53:42 fvdl Exp $ */
/*
}
LIST_INSERT_HEAD(nhpp, np, n_hash);
- if (fhsize > NFS_SMALLFH) {
- np->n_fhp = malloc(fhsize, M_NFSBIGFH, M_WAITOK);
- } else
- np->n_fhp = &np->n_fh;
+ np->n_fhp = &np->n_fh;
bcopy((caddr_t)fhp, (caddr_t)np->n_fhp, fhsize);
np->n_fhsize = fhsize;
np->n_accstamp = -1;
if (np->n_hash.le_prev != NULL)
LIST_REMOVE(np, n_hash);
- if (np->n_fhsize > NFS_SMALLFH)
- free(np->n_fhp, M_NFSBIGFH);
-
if (np->n_rcred)
crfree(np->n_rcred);
if (np->n_wcred)
vp->v_data = NULL;
return (0);
}
-
-/* $OpenBSD: nfs_vnops.c,v 1.98 2008/07/25 14:56:47 beck Exp $ */
+/* $OpenBSD: nfs_vnops.c,v 1.99 2008/08/08 20:40:24 blambert Exp $ */
/* $NetBSD: nfs_vnops.c,v 1.62.4.1 1996/07/08 20:26:52 jtc Exp $ */
/*
nfsm_getfh(nfhp, fhlen, v3);
if (*npp) {
np = *npp;
- if (np->n_fhsize > NFS_SMALLFH && fhlen <= NFS_SMALLFH) {
- free((caddr_t)np->n_fhp, M_NFSBIGFH);
- np->n_fhp = &np->n_fh;
- } else if (np->n_fhsize <= NFS_SMALLFH && fhlen>NFS_SMALLFH)
- np->n_fhp =(nfsfh_t *)malloc(fhlen,M_NFSBIGFH,M_WAITOK);
+ np->n_fhp = &np->n_fh;
bcopy((caddr_t)nfhp, (caddr_t)np->n_fhp, fhlen);
np->n_fhsize = fhlen;
newvp = NFSTOV(np);