diff options
author | Ingo Molnar <mingo@kernel.org> | 2016-09-20 08:29:21 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2016-09-20 08:29:21 +0200 |
commit | b2c16e1efddeb517c62d242fb8ec30a383843468 (patch) | |
tree | fbfbe6f124a9423abf9a288ad46feb6db7469c42 /lib | |
parent | 81539169f283329fd8bc58457cc15754f683ba69 (diff) | |
parent | d2ffb0103aaefa9b169da042cf39ce27bfb6cdbb (diff) | |
download | linux-rpi3-b2c16e1efddeb517c62d242fb8ec30a383843468.tar.gz linux-rpi3-b2c16e1efddeb517c62d242fb8ec30a383843468.tar.bz2 linux-rpi3-b2c16e1efddeb517c62d242fb8ec30a383843468.zip |
Merge branch 'linus' into x86/asm, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/iov_iter.c | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/lib/iov_iter.c b/lib/iov_iter.c index 9e8c7386b3a0..7e3138cfc8c9 100644 --- a/lib/iov_iter.c +++ b/lib/iov_iter.c @@ -291,33 +291,13 @@ done: } /* - * Fault in the first iovec of the given iov_iter, to a maximum length - * of bytes. Returns 0 on success, or non-zero if the memory could not be - * accessed (ie. because it is an invalid address). - * - * writev-intensive code may want this to prefault several iovecs -- that - * would be possible (callers must not rely on the fact that _only_ the - * first iovec will be faulted with the current implementation). - */ -int iov_iter_fault_in_readable(struct iov_iter *i, size_t bytes) -{ - if (!(i->type & (ITER_BVEC|ITER_KVEC))) { - char __user *buf = i->iov->iov_base + i->iov_offset; - bytes = min(bytes, i->iov->iov_len - i->iov_offset); - return fault_in_pages_readable(buf, bytes); - } - return 0; -} -EXPORT_SYMBOL(iov_iter_fault_in_readable); - -/* * Fault in one or more iovecs of the given iov_iter, to a maximum length of * bytes. For each iovec, fault in each page that constitutes the iovec. * * Return 0 on success, or non-zero if the memory could not be accessed (i.e. * because it is an invalid address). */ -int iov_iter_fault_in_multipages_readable(struct iov_iter *i, size_t bytes) +int iov_iter_fault_in_readable(struct iov_iter *i, size_t bytes) { size_t skip = i->iov_offset; const struct iovec *iov; @@ -334,7 +314,7 @@ int iov_iter_fault_in_multipages_readable(struct iov_iter *i, size_t bytes) } return 0; } -EXPORT_SYMBOL(iov_iter_fault_in_multipages_readable); +EXPORT_SYMBOL(iov_iter_fault_in_readable); void iov_iter_init(struct iov_iter *i, int direction, const struct iovec *iov, unsigned long nr_segs, |