summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2014-12-10 20:49:01 +0100
committerAl Viro <viro@zeniv.linux.org.uk>2015-02-04 07:34:15 +0100
commitaad9a1cec7dcd1d45809b64643fce37061b17788 (patch)
treecd3236a0ab568ef715f68be9777483d0d39feec1 /lib
parentnet: switch sockets to ->read_iter/->write_iter (diff)
downloadlinux-aad9a1cec7dcd1d45809b64643fce37061b17788.tar.xz
linux-aad9a1cec7dcd1d45809b64643fce37061b17788.zip
vhost: switch vhost get_indirect() to iov_iter, kill memcpy_fromiovec()
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')
-rw-r--r--lib/iovec.c25
1 files changed, 0 insertions, 25 deletions
diff --git a/lib/iovec.c b/lib/iovec.c
index 2d99cb4a5006..4a90875c64ae 100644
--- a/lib/iovec.c
+++ b/lib/iovec.c
@@ -3,31 +3,6 @@
#include <linux/uio.h>
/*
- * Copy iovec to kernel. Returns -EFAULT on error.
- *
- * Note: this modifies the original iovec.
- */
-
-int memcpy_fromiovec(unsigned char *kdata, struct iovec *iov, int len)
-{
- while (len > 0) {
- if (iov->iov_len) {
- int copy = min_t(unsigned int, len, iov->iov_len);
- if (copy_from_user(kdata, iov->iov_base, copy))
- return -EFAULT;
- len -= copy;
- kdata += copy;
- iov->iov_base += copy;
- iov->iov_len -= copy;
- }
- iov++;
- }
-
- return 0;
-}
-EXPORT_SYMBOL(memcpy_fromiovec);
-
-/*
* Copy kernel to iovec. Returns -EFAULT on error.
*/