Commit 55ca375c authored by Al Viro's avatar Al Viro

copy_page_from_iter(): don't need kmap_atomic() for kvec/bvec cases

kmap_local_page() is enough.
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent c1d4d6a9
......@@ -871,9 +871,9 @@ size_t copy_page_from_iter(struct page *page, size_t offset, size_t bytes,
if (likely(iter_is_iovec(i)))
return copy_page_from_iter_iovec(page, offset, bytes, i);
if (iov_iter_is_bvec(i) || iov_iter_is_kvec(i) || iov_iter_is_xarray(i)) {
void *kaddr = kmap_atomic(page);
void *kaddr = kmap_local_page(page);
size_t wanted = _copy_from_iter(kaddr + offset, bytes, i);
kunmap_atomic(kaddr);
kunmap_local(kaddr);
return wanted;
}
WARN_ON(1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment