From 893839fd57330ce226d4ee1b16fd5221a27fb6ec Mon Sep 17 00:00:00 2001 From: Al Viro Date: Fri, 30 Apr 2021 18:39:25 -0400 Subject: 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 --- lib/iov_iter.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib') 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; -- cgit v1.2.3