Messages in this thread Patch in this message | | | From | Al Viro <> | Subject | [RFC PATCH 07/37] [xarray] iov_iter_fault_in_readable() should do nothing in xarray case | Date | Sun, 6 Jun 2021 19:10:21 +0000 |
| |
... 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> --- lib/iov_iter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
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)) -- 2.11.0
| |