summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2021-06-02 21:48:21 +0300
committerAl Viro <viro@zeniv.linux.org.uk>2021-06-03 17:36:51 +0300
commit0e8f0d67401589a141950856902c7d0ec8d9c985 (patch)
tree556768d7c2f78cdc3acc63d61733ccf13df09530
parenta506abc7b644d71966a75337d5a534f531b3cdc4 (diff)
downloadlinux-0e8f0d67401589a141950856902c7d0ec8d9c985.tar.xz
[xarray] iov_iter_fault_in_readable() should do nothing in xarray case
... and actually should just check it's given an iovec-backed iterator in the first place. Cc: stable@vger.kernel.org Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r--lib/iov_iter.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/iov_iter.c b/lib/iov_iter.c
index c8877cffb7bc..a3aabeda945b 100644
--- a/lib/iov_iter.c
+++ b/lib/iov_iter.c
@@ -476,7 +476,7 @@ int iov_iter_fault_in_readable(struct iov_iter *i, size_t bytes)
int err;
struct iovec v;
- if (!(i->type & (ITER_BVEC|ITER_KVEC))) {
+ if (iter_is_iovec(i)) {
iterate_iovec(i, bytes, v, iov, skip, ({
err = fault_in_pages_readable(v.iov_base, v.iov_len);
if (unlikely(err))