diff options
| author | Mohan Srinivasan <mohans@FreeBSD.org> | 2006-11-29 02:21:40 +0000 |
|---|---|---|
| committer | Mohan Srinivasan <mohans@FreeBSD.org> | 2006-11-29 02:21:40 +0000 |
| commit | 594ece53bc8f4065dc3c93f78537a59cdf32baa7 (patch) | |
| tree | 7ebe7ba3c233f1abe4d9321faa6438a791bc1b61 /sys | |
| parent | a6b2640236b3ebf0ec910916d5158376adbeb960 (diff) | |
Notes
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/nfsclient/nfs_node.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/nfsclient/nfs_node.c b/sys/nfsclient/nfs_node.c index 85580a87d99d..b6b92630f073 100644 --- a/sys/nfsclient/nfs_node.c +++ b/sys/nfsclient/nfs_node.c @@ -160,6 +160,12 @@ nfs_nget(struct mount *mntp, nfsfh_t *fhp, int fhsize, struct nfsnode **npp, int */ vp->v_vnlock->lk_flags |= LK_CANRECURSE; vp->v_vnlock->lk_flags &= ~LK_NOSHARE; + if (fhsize > NFS_SMALLFH) { + MALLOC(np->n_fhp, nfsfh_t *, fhsize, M_NFSBIGFH, M_WAITOK); + } else + np->n_fhp = &np->n_fh; + bcopy((caddr_t)fhp, (caddr_t)np->n_fhp, fhsize); + np->n_fhsize = fhsize; error = vfs_hash_insert(vp, hash, flags, td, &nvp, nfs_vncmpf, &ncmp); if (error) @@ -169,12 +175,6 @@ nfs_nget(struct mount *mntp, nfsfh_t *fhp, int fhsize, struct nfsnode **npp, int /* vfs_hash_insert() vput()'s the losing vnode */ return (0); } - if (fhsize > NFS_SMALLFH) { - MALLOC(np->n_fhp, nfsfh_t *, fhsize, M_NFSBIGFH, M_WAITOK); - } else - np->n_fhp = &np->n_fh; - bcopy((caddr_t)fhp, (caddr_t)np->n_fhp, fhsize); - np->n_fhsize = fhsize; *npp = np; return (0); |
