diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2014-11-25 01:45:05 +0100 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2014-12-09 22:29:11 +0100 |
commit | 218321e7a0838c2be974539f0a5341b398d4432b (patch) | |
tree | f2b6606ee509292bfb98d7427a21f9882b6a945e | |
parent | skb_copy_datagram_iovec() can die (diff) | |
download | linux-218321e7a0838c2be974539f0a5341b398d4432b.tar.xz linux-218321e7a0838c2be974539f0a5341b398d4432b.zip |
bury memcpy_toiovec()
no users left
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r-- | include/linux/uio.h | 1 | ||||
-rw-r--r-- | lib/iovec.c | 25 |
2 files changed, 0 insertions, 26 deletions
diff --git a/include/linux/uio.h b/include/linux/uio.h index bd8569a14c4a..a41e252396c0 100644 --- a/include/linux/uio.h +++ b/include/linux/uio.h @@ -131,7 +131,6 @@ size_t csum_and_copy_to_iter(void *addr, size_t bytes, __wsum *csum, struct iov_ size_t csum_and_copy_from_iter(void *addr, size_t bytes, __wsum *csum, struct iov_iter *i); int memcpy_fromiovec(unsigned char *kdata, struct iovec *iov, int len); -int memcpy_toiovec(struct iovec *iov, unsigned char *kdata, int len); int memcpy_fromiovecend(unsigned char *kdata, const struct iovec *iov, int offset, int len); int memcpy_toiovecend(const struct iovec *v, unsigned char *kdata, diff --git a/lib/iovec.c b/lib/iovec.c index df3abd1eaa4a..2d99cb4a5006 100644 --- a/lib/iovec.c +++ b/lib/iovec.c @@ -29,31 +29,6 @@ EXPORT_SYMBOL(memcpy_fromiovec); /* * Copy kernel to iovec. Returns -EFAULT on error. - * - * Note: this modifies the original iovec. - */ - -int memcpy_toiovec(struct iovec *iov, unsigned char *kdata, int len) -{ - while (len > 0) { - if (iov->iov_len) { - int copy = min_t(unsigned int, iov->iov_len, len); - if (copy_to_user(iov->iov_base, kdata, copy)) - return -EFAULT; - kdata += copy; - len -= copy; - iov->iov_len -= copy; - iov->iov_base += copy; - } - iov++; - } - - return 0; -} -EXPORT_SYMBOL(memcpy_toiovec); - -/* - * Copy kernel to iovec. Returns -EFAULT on error. */ int memcpy_toiovecend(const struct iovec *iov, unsigned char *kdata, |