diff --git a/sys/kern/kern_subr.c b/sys/kern/kern_subr.c index 48c3af4ecefe..a1c90fdfb33c 100644 --- a/sys/kern/kern_subr.c +++ b/sys/kern/kern_subr.c @@ -211,8 +211,7 @@ uiomove_frombuf(void *buf, int buflen, struct uio *uio) * Experimental support for zero-copy I/O */ static int -userspaceco(void *cp, u_int cnt, struct uio *uio, struct vm_object *obj, - int disposable) +userspaceco(void *cp, u_int cnt, struct uio *uio, int disposable) { struct iovec *iov; int error; @@ -220,7 +219,6 @@ userspaceco(void *cp, u_int cnt, struct uio *uio, struct vm_object *obj, iov = uio->uio_iov; if (uio->uio_rw == UIO_READ) { if ((so_zero_copy_receive != 0) - && (obj == NULL) && ((cnt & PAGE_MASK) == 0) && ((((intptr_t) iov->iov_base) & PAGE_MASK) == 0) && ((uio->uio_offset & PAGE_MASK) == 0) @@ -254,8 +252,7 @@ userspaceco(void *cp, u_int cnt, struct uio *uio, struct vm_object *obj, } int -uiomoveco(void *cp, int n, struct uio *uio, struct vm_object *obj, - int disposable) +uiomoveco(void *cp, int n, struct uio *uio, int disposable) { struct iovec *iov; u_int cnt; @@ -283,7 +280,7 @@ uiomoveco(void *cp, int n, struct uio *uio, struct vm_object *obj, if (ticks - PCPU_GET(switchticks) >= hogticks) uio_yield(); - error = userspaceco(cp, cnt, uio, obj, disposable); + error = userspaceco(cp, cnt, uio, disposable); if (error) return (error); diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index b741f41f56bb..7982deac959a 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -902,8 +902,7 @@ soreceive_rcvoob(so, uio, flags) error = uiomoveco(mtod(m, void *), min(uio->uio_resid, m->m_len), - uio, pg->object, - disposable); + uio, disposable); } else #endif /* ZERO_COPY_SOCKETS */ error = uiomove(mtod(m, void *), @@ -1246,7 +1245,7 @@ soreceive(so, psa, uio, mp0, controlp, flagsp) uio->uio_offset =IDX_TO_OFF(pg->pindex); error = uiomoveco(mtod(m, char *) + moff, - (int)len, uio,pg->object, + (int)len, uio, disposable); } else #endif /* ZERO_COPY_SOCKETS */ diff --git a/sys/sys/uio.h b/sys/sys/uio.h index f89c9c4c9d64..9dd827f4f76a 100644 --- a/sys/sys/uio.h +++ b/sys/sys/uio.h @@ -94,8 +94,7 @@ int uiomove(void *cp, int n, struct uio *uio); int uiomove_frombuf(void *buf, int buflen, struct uio *uio); int uiomove_fromphys(struct vm_page *ma[], vm_offset_t offset, int n, struct uio *uio); -int uiomoveco(void *cp, int n, struct uio *uio, struct vm_object *obj, - int disposable); +int uiomoveco(void *cp, int n, struct uio *uio, int disposable); #else /* !_KERNEL */