summaryrefslogtreecommitdiffstats
path: root/fs/ext4
diff options
context:
space:
mode:
authorChaitanya Kulkarni <chaitanya.kulkarni@wdc.com>2021-02-07 11:04:22 -0800
committerTheodore Ts'o <tytso@mit.edu>2021-03-25 10:19:48 -0400
commit4d93874b9e9ce582fd4401334c88eaf93b6dff43 (patch)
tree21862e2655e2d4d24ec7c4bbe763c2cf7f83faef /fs/ext4
parent0d02ec6b3136c73c09e7859f0d0e4e2c4c07b49b (diff)
downloadlinux-4d93874b9e9ce582fd4401334c88eaf93b6dff43.tar.bz2
ext4: use memcpy_from_page() in pagecache_read()
Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com> Link: https://lore.kernel.org/r/20210207190425.38107-6-chaitanya.kulkarni@wdc.com Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4')
-rw-r--r--fs/ext4/verity.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/ext4/verity.c b/fs/ext4/verity.c
index 00e3cbde472e..daf88669a2e9 100644
--- a/fs/ext4/verity.c
+++ b/fs/ext4/verity.c
@@ -45,16 +45,13 @@ static int pagecache_read(struct inode *inode, void *buf, size_t count,
size_t n = min_t(size_t, count,
PAGE_SIZE - offset_in_page(pos));
struct page *page;
- void *addr;
page = read_mapping_page(inode->i_mapping, pos >> PAGE_SHIFT,
NULL);
if (IS_ERR(page))
return PTR_ERR(page);
- addr = kmap_atomic(page);
- memcpy(buf, addr + offset_in_page(pos), n);
- kunmap_atomic(addr);
+ memcpy_from_page(buf, page, offset_in_page(pos), n);
put_page(page);