diff options
author | Bret Lambert <blambert@cvs.openbsd.org> | 2009-06-06 23:40:31 +0000 |
---|---|---|
committer | Bret Lambert <blambert@cvs.openbsd.org> | 2009-06-06 23:40:31 +0000 |
commit | c26bc5bfd3f3cdd7eb49c47edc6e7bf88684cc7d (patch) | |
tree | ba957c737e7b0fe81b32bebbd62d16cf8605a0c1 /sys/nfs | |
parent | 7513669301c5d309c3e20de59858da46a4475645 (diff) |
Don't allocate an mbuf cluster without checking to see if it will
actually get us anything.
ok thib@
Diffstat (limited to 'sys/nfs')
-rw-r--r-- | sys/nfs/nfs_serv.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/nfs/nfs_serv.c b/sys/nfs/nfs_serv.c index 1490a686e0e..0e74b5b9b97 100644 --- a/sys/nfs/nfs_serv.c +++ b/sys/nfs/nfs_serv.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_serv.c,v 1.74 2009/06/06 22:59:17 blambert Exp $ */ +/* $OpenBSD: nfs_serv.c,v 1.75 2009/06/06 23:40:30 blambert Exp $ */ /* $NetBSD: nfs_serv.c,v 1.34 1997/05/12 23:37:12 fvdl Exp $ */ /* @@ -603,7 +603,8 @@ nfsrv_read(nfsd, slp, procp, mrq) } if (left > 0) { MGET(m, M_WAIT, MT_DATA); - MCLGET(m, M_WAIT); + if (left >= MINCLSIZE) + MCLGET(m, M_WAIT); m->m_len = 0; m2->m_next = m; m2 = m; |