copy_page_from_iter(): don't need kmap_atomic() for kvec/bvec cases
kmap_local_page() is enough. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
c1d4d6a9ae
commit
55ca375c5d
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user