From 9ee2c32a73816704cd27d077ba879665504d6bfd Mon Sep 17 00:00:00 2001 From: Damien Bergamini Date: Wed, 16 Apr 2008 20:02:47 +0000 Subject: more efficient use of mbufs in nfsm_uiotombuf(). allocate a mbuf cluster only if length is greater than MLEN instead of MINCLSIZE. ok blambert@, thib@ --- sys/nfs/nfs_subs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys') diff --git a/sys/nfs/nfs_subs.c b/sys/nfs/nfs_subs.c index 91f6b819d41..273b1bdc3c2 100644 --- a/sys/nfs/nfs_subs.c +++ b/sys/nfs/nfs_subs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_subs.c,v 1.70 2008/04/14 13:46:13 blambert Exp $ */ +/* $OpenBSD: nfs_subs.c,v 1.71 2008/04/16 20:02:46 damien Exp $ */ /* $NetBSD: nfs_subs.c,v 1.27.4.3 1996/07/08 20:34:24 jtc Exp $ */ /* @@ -747,7 +747,7 @@ nfsm_uiotombuf(struct mbuf **mp, struct uio *uiop, size_t len, caddr_t *bposp) len -= xfer; if (len > 0) { MGET(mb2, M_WAIT, MT_DATA); - if (len > MINCLSIZE) + if (len > MLEN) MCLGET(mb2, M_WAIT); mb2->m_len = 0; mb->m_next = mb2; -- cgit v1.2.3