summaryrefslogtreecommitdiff
path: root/include/linux/highmem.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2021-07-24 01:50:20 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2021-07-24 03:43:28 +0300
commitd9a42b53bdf7b0329dc09a59fc1b092640b6da19 (patch)
tree0cb41491d2300e4d4ec455c597ed2d71a2bf70a8 /include/linux/highmem.h
parent8dad53a11f8d94dceb540a5f8f153484f42be84b (diff)
downloadlinux-d9a42b53bdf7b0329dc09a59fc1b092640b6da19.tar.xz
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/20210713055231.137602-3-hch@lst.de Fixes: 28961998f858 ("iov_iter: lift memzero_page() to highmem.h") Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com> Reviewed-by: Ira Weiny <ira.weiny@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/highmem.h')
-rw-r--r--include/linux/highmem.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/highmem.h b/include/linux/highmem.h
index 8e7e50a53a12..d9a606a9fc64 100644
--- a/include/linux/highmem.h
+++ b/include/linux/highmem.h
@@ -324,10 +324,10 @@ static inline void memcpy_to_page(struct page *page, size_t offset,
static inline void memzero_page(struct page *page, size_t offset, size_t len)
{
- char *addr = kmap_atomic(page);
+ char *addr = kmap_local_page(page);
memset(addr + offset, 0, len);
flush_dcache_page(page);
- kunmap_atomic(addr);
+ kunmap_local(addr);
}
#endif /* _LINUX_HIGHMEM_H */