diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2014-12-10 14:49:01 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2015-02-04 01:34:15 -0500 |
commit | aad9a1cec7dcd1d45809b64643fce37061b17788 (patch) | |
tree | cd3236a0ab568ef715f68be9777483d0d39feec1 /lib/iovec.c | |
parent | 8ae5e030f30e50a81df1b269d5a5c32d023aa66d (diff) |
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/iovec.c')
-rw-r--r-- | lib/iovec.c | 25 |
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. */ |