[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210207190425.38107-8-chaitanya.kulkarni@wdc.com>
Date: Sun, 7 Feb 2021 11:04:24 -0800
From: Chaitanya Kulkarni <chaitanya.kulkarni@....com>
To: linux-block@...r.kernel.org, linux-ext4@...r.kernel.org,
linux-f2fs-devel@...ts.sourceforge.net,
linux-fsdevel@...r.kernel.org
Cc: axboe@...nel.dk, tytso@....edu, adilger.kernel@...ger.ca,
jaegeuk@...nel.org, chao@...nel.org, johannes.thumshirn@....com,
damien.lemoal@....com, bvanassche@....org,
chaitanya.kulkarni@....com, dongli.zhang@...cle.com, clm@...com,
ira.weiny@...el.com, dsterba@...e.com, ebiggers@...nel.org,
hch@...radead.org, dave.hansen@...el.com
Subject: [RFC PATCH 7/8] f2fs: use memcpy_from_page() in pagecache_read()
Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@....com>
---
fs/f2fs/verity.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/fs/f2fs/verity.c b/fs/f2fs/verity.c
index 054ec852b5ea..44e057bdc416 100644
--- a/fs/f2fs/verity.c
+++ b/fs/f2fs/verity.c
@@ -47,16 +47,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);
--
2.22.1
Powered by blists - more mailing lists