diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2021-04-30 18:39:25 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2021-06-10 11:45:24 -0400 |
commit | 893839fd57330ce226d4ee1b16fd5221a27fb6ec (patch) | |
tree | 5b974a4bb4d6f393fa8aa4099c02ad28bc393e11 /lib | |
parent | 2495bdcc86dc5e6b71b6785e1faa76452496c687 (diff) | |
download | linux-893839fd57330ce226d4ee1b16fd5221a27fb6ec.tar.gz linux-893839fd57330ce226d4ee1b16fd5221a27fb6ec.tar.bz2 linux-893839fd57330ce226d4ee1b16fd5221a27fb6ec.zip |
pipe_zero(): we don't need no stinkin' kmap_atomic()...
FWIW, memcpy_to_page() itself almost certainly ought to
use kmap_local_page()...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/iov_iter.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/iov_iter.c b/lib/iov_iter.c index 3b442d25a966..a827991f2644 100644 --- a/lib/iov_iter.c +++ b/lib/iov_iter.c @@ -897,7 +897,9 @@ static size_t pipe_zero(size_t bytes, struct iov_iter *i) do { size_t chunk = min_t(size_t, n, PAGE_SIZE - off); - memzero_page(pipe->bufs[i_head & p_mask].page, off, chunk); + char *p = kmap_local_page(pipe->bufs[i_head & p_mask].page); + memset(p + off, 0, chunk); + kunmap_local(p); i->head = i_head; i->iov_offset = off + chunk; n -= chunk; |