Skip to content

Commit d9a42b5

Browse files
Christoph Hellwigtorvalds
authored andcommitted
mm: use kmap_local_page in memzero_page
The commit message introducing the global memzero_page explicitly mentions switching to kmap_local_page in the commit log but doesn't actually do that. Link: https://lkml.kernel.org/r/[email protected] Fixes: 2896199 ("iov_iter: lift memzero_page() to highmem.h") Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Chaitanya Kulkarni <[email protected]> Reviewed-by: Ira Weiny <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 8dad53a commit d9a42b5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/linux/highmem.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,10 +324,10 @@ static inline void memcpy_to_page(struct page *page, size_t offset,
324324

325325
static inline void memzero_page(struct page *page, size_t offset, size_t len)
326326
{
327-
char *addr = kmap_atomic(page);
327+
char *addr = kmap_local_page(page);
328328
memset(addr + offset, 0, len);
329329
flush_dcache_page(page);
330-
kunmap_atomic(addr);
330+
kunmap_local(addr);
331331
}
332332

333333
#endif /* _LINUX_HIGHMEM_H */

0 commit comments

Comments
 (0)