Commit 893839fd authored by Al Viro's avatar Al Viro

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: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 2495bdcc
......@@ -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;
......
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