diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2017-09-24 14:03:29 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2017-10-11 17:23:43 -0400 |
commit | faea13297ea739f94913d56d7b865134b4fc8726 (patch) | |
tree | 0420fe89fa4b2f6edfccdf60d7a42538e3e710d1 | |
parent | 0e5b935d43f385ab23d2e38e7134b1abb0e7907e (diff) | |
download | linux-faea13297ea739f94913d56d7b865134b4fc8726.tar.gz linux-faea13297ea739f94913d56d7b865134b4fc8726.tar.bz2 linux-faea13297ea739f94913d56d7b865134b4fc8726.zip |
kill iov_shorten()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r-- | fs/read_write.c | 21 | ||||
-rw-r--r-- | include/linux/uio.h | 2 |
2 files changed, 0 insertions, 23 deletions
diff --git a/fs/read_write.c b/fs/read_write.c index f0d4b16873e8..b8bf2cb3298a 100644 --- a/fs/read_write.c +++ b/fs/read_write.c @@ -634,27 +634,6 @@ SYSCALL_DEFINE4(pwrite64, unsigned int, fd, const char __user *, buf, return ret; } -/* - * Reduce an iovec's length in-place. Return the resulting number of segments - */ -unsigned long iov_shorten(struct iovec *iov, unsigned long nr_segs, size_t to) -{ - unsigned long seg = 0; - size_t len = 0; - - while (seg < nr_segs) { - seg++; - if (len + iov->iov_len >= to) { - iov->iov_len = to - len; - break; - } - len += iov->iov_len; - iov++; - } - return seg; -} -EXPORT_SYMBOL(iov_shorten); - static ssize_t do_iter_readv_writev(struct file *filp, struct iov_iter *iter, loff_t *ppos, int type, rwf_t flags) { diff --git a/include/linux/uio.h b/include/linux/uio.h index 8a642cda641c..5885daeae721 100644 --- a/include/linux/uio.h +++ b/include/linux/uio.h @@ -80,8 +80,6 @@ static inline struct iovec iov_iter_iovec(const struct iov_iter *iter) ((iov = iov_iter_iovec(&(iter))), 1); \ iov_iter_advance(&(iter), (iov).iov_len)) -unsigned long iov_shorten(struct iovec *iov, unsigned long nr_segs, size_t to); - size_t iov_iter_copy_from_user_atomic(struct page *page, struct iov_iter *i, unsigned long offset, size_t bytes); void iov_iter_advance(struct iov_iter *i, size_t bytes); |