[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210207190425.38107-7-chaitanya.kulkarni@wdc.com>
Date: Sun, 7 Feb 2021 11:04:23 -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 6/8] ext4: use memcpy_to_page() in pagecache_write()
Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@....com>
---
fs/ext4/verity.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/fs/ext4/verity.c b/fs/ext4/verity.c
index c8e07f8a792d..cc4b046490b0 100644
--- a/fs/ext4/verity.c
+++ b/fs/ext4/verity.c
@@ -77,7 +77,6 @@ static int pagecache_write(struct inode *inode, const void *buf, size_t count,
PAGE_SIZE - offset_in_page(pos));
struct page *page;
void *fsdata;
- void *addr;
int res;
res = pagecache_write_begin(NULL, inode->i_mapping, pos, n, 0,
@@ -85,9 +84,7 @@ static int pagecache_write(struct inode *inode, const void *buf, size_t count,
if (res)
return res;
- addr = kmap_atomic(page);
- memcpy(addr + offset_in_page(pos), buf, n);
- kunmap_atomic(addr);
+ memcpy_to_page(page, offset_in_page(pos), buf, n);
res = pagecache_write_end(NULL, inode->i_mapping, pos, n, n,
page, fsdata);
--
2.22.1
Powered by blists - more mailing lists