summaryrefslogtreecommitdiffstats
path: root/lib/iovec.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2014-12-10 15:51:28 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2015-02-04 01:34:16 -0500
commitba7438aed924133df54a60e4cd5499d359bcf2a8 (patch)
treee29c9a26421611c374667b022c9904ab527c496f /lib/iovec.c
parent98a527aac1eb198dbc4405b800e102563ed8e4dd (diff)
downloadlinux-ba7438aed924133df54a60e4cd5499d359bcf2a8.tar.bz2
vhost: don't bother copying iovecs in handle_rx(), kill memcpy_toiovecend()
Cc: Michael S. Tsirkin <mst@redhat.com> Cc: kvm@vger.kernel.org Cc: virtualization@lists.linux-foundation.org Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'lib/iovec.c')
-rw-r--r--lib/iovec.c26
1 files changed, 0 insertions, 26 deletions
diff --git a/lib/iovec.c b/lib/iovec.c
index 4a90875c64ae..d8f17a9b1ccf 100644
--- a/lib/iovec.c
+++ b/lib/iovec.c
@@ -3,32 +3,6 @@
#include <linux/uio.h>
/*
- * Copy kernel to iovec. Returns -EFAULT on error.
- */
-
-int memcpy_toiovecend(const struct iovec *iov, unsigned char *kdata,
- int offset, int len)
-{
- int copy;
- for (; len > 0; ++iov) {
- /* Skip over the finished iovecs */
- if (unlikely(offset >= iov->iov_len)) {
- offset -= iov->iov_len;
- continue;
- }
- copy = min_t(unsigned int, iov->iov_len - offset, len);
- if (copy_to_user(iov->iov_base + offset, kdata, copy))
- return -EFAULT;
- offset = 0;
- kdata += copy;
- len -= copy;
- }
-
- return 0;
-}
-EXPORT_SYMBOL(memcpy_toiovecend);
-
-/*
* Copy iovec to kernel. Returns -EFAULT on error.
*/