diff options
Diffstat (limited to 'sys/nfs/nfs_socket.c')
| -rw-r--r-- | sys/nfs/nfs_socket.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/nfs/nfs_socket.c b/sys/nfs/nfs_socket.c index 711df25ea09..06f7850d066 100644 --- a/sys/nfs/nfs_socket.c +++ b/sys/nfs/nfs_socket.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_socket.c,v 1.88 2009/07/18 20:30:22 thib Exp $ */ +/* $OpenBSD: nfs_socket.c,v 1.89 2009/07/20 11:47:58 blambert Exp $ */ /* $NetBSD: nfs_socket.c,v 1.27 1996/04/15 20:20:00 thorpej Exp $ */ /* @@ -78,6 +78,8 @@ extern int nfs_ticks; struct nfsreqhead nfs_reqq; +extern struct pool nfsrv_descript_pl; + /* * There is a congestion window for outstanding rpcs maintained per mount * point. The cwnd size is adjusted in roughly the way that: @@ -1881,7 +1883,7 @@ nfsrv_dorec(slp, nfsd, ndp) nam->m_next = NULL; } else nam = NULL; - nd = malloc(sizeof(struct nfsrv_descript), M_NFSRVDESC, M_WAITOK); + nd = pool_get(&nfsrv_descript_pl, PR_WAITOK); nfs_realign(&m, 10 * NFSX_UNSIGNED); nd->nd_md = nd->nd_mrep = m; nd->nd_nam2 = nam; @@ -1889,7 +1891,7 @@ nfsrv_dorec(slp, nfsd, ndp) error = nfs_getreq(nd, nfsd, 1); if (error) { m_freem(nam); - free(nd, M_NFSRVDESC); + pool_put(&nfsrv_descript_pl, nd); return (error); } *ndp = nd; |
