summaryrefslogtreecommitdiffstats
path: root/sys/kern/uipc_syscalls.c
diff options
context:
space:
mode:
authorandre <andre@FreeBSD.org>2006-11-02 17:37:22 +0000
committerandre <andre@FreeBSD.org>2006-11-02 17:37:22 +0000
commitd1cc5b22d78b6226d2469a4044e415f618ab894a (patch)
tree8d00998734eae5e0a44b4233c21fbe5312956685 /sys/kern/uipc_syscalls.c
parent72eb46ae51bea2bdc5f1deb6728f9bdd26092ed5 (diff)
downloadFreeBSD-src-d1cc5b22d78b6226d2469a4044e415f618ab894a.zip
FreeBSD-src-d1cc5b22d78b6226d2469a4044e415f618ab894a.tar.gz
Rename m_getm() to m_getm2() and rewrite it to allocate up to page sized
mbuf clusters. Add a flags parameter to accept M_PKTHDR and M_EOR mbuf chain flags. Provide compatibility macro for m_getm() calling m_getm2() with M_PKTHDR set. Rewrite m_uiotombuf() to use m_getm2() for mbuf allocation and do the uiomove() in a tight loop over the mbuf chain. Add a flags parameter to accept mbuf flags to be passed to m_getm2(). Adjust all callers for the extra parameter. Sponsored by: TCP/IP Optimization Fundraise 2005 MFC after: 3 month
Diffstat (limited to 'sys/kern/uipc_syscalls.c')
-rw-r--r--sys/kern/uipc_syscalls.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/kern/uipc_syscalls.c b/sys/kern/uipc_syscalls.c
index dfc49f7..1636a69 100644
--- a/sys/kern/uipc_syscalls.c
+++ b/sys/kern/uipc_syscalls.c
@@ -1966,13 +1966,11 @@ kern_sendfile(struct thread *td, struct sendfile_args *uap,
hdr_uio->uio_rw = UIO_WRITE;
if (hdr_uio->uio_resid > 0) {
m = m_uiotombuf(hdr_uio, (mnw ? M_NOWAIT : M_WAITOK),
- 0, 0);
+ 0, 0, 0);
if (m == NULL) {
error = mnw ? EAGAIN : ENOBUFS;
goto done;
}
- /* XXX: This should not be a header mbuf. */
- m_demote(m, 0);
headersize = hdr_uio->uio_resid;
if (compat)
sbytes += headersize;
OpenPOWER on IntegriCloud