linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
From: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
To: linux-block@vger.kernel.org, linux-ext4@vger.kernel.org,
	linux-f2fs-devel@lists.sourceforge.net,
	linux-fsdevel@vger.kernel.org
Cc: axboe@kernel.dk, hch@infradead.org, damien.lemoal@wdc.com,
	tytso@mit.edu, bvanassche@acm.org, chaitanya.kulkarni@wdc.com,
	dave.hansen@intel.com, johannes.thumshirn@wdc.com,
	ebiggers@kernel.org, clm@fb.com, adilger.kernel@dilger.ca,
	dongli.zhang@oracle.com, dsterba@suse.com, jaegeuk@kernel.org,
	ira.weiny@intel.com
Subject: [f2fs-dev] [RFC PATCH 5/8] ext4: use memcpy_from_page() in pagecache_read()
Date: Sun,  7 Feb 2021 11:04:22 -0800	[thread overview]
Message-ID: <20210207190425.38107-6-chaitanya.kulkarni@wdc.com> (raw)
In-Reply-To: <20210207190425.38107-1-chaitanya.kulkarni@wdc.com>

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.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 5b7ba8f71153..c8e07f8a792d 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);
 
-- 
2.22.1



_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

  parent reply	other threads:[~2021-02-07 19:05 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-07 19:04 [f2fs-dev] [RFC PATCH 0/8] use core page calls instead of kmaps Chaitanya Kulkarni
2021-02-07 19:04 ` [f2fs-dev] [RFC PATCH 1/8] brd: use memcpy_from_page() in copy_from_brd() Chaitanya Kulkarni
2021-02-07 19:04 ` [f2fs-dev] [RFC PATCH 2/8] " Chaitanya Kulkarni
2021-02-08  4:35   ` Ira Weiny
2021-02-08  5:47     ` Chaitanya Kulkarni
2021-02-07 19:04 ` [f2fs-dev] [RFC PATCH 3/8] null_blk: use memcpy_page() in copy_to_nullb() Chaitanya Kulkarni
2021-02-07 19:04 ` [f2fs-dev] [RFC PATCH 4/8] null_blk: use memcpy_page() in copy_from_nullb() Chaitanya Kulkarni
2021-02-07 19:04 ` Chaitanya Kulkarni [this message]
2021-02-07 19:04 ` [f2fs-dev] [RFC PATCH 6/8] ext4: use memcpy_to_page() in pagecache_write() Chaitanya Kulkarni
2021-03-25 14:22   ` Theodore Ts'o
2021-03-25 15:09     ` Ira Weiny
2021-03-25 15:10     ` Ira Weiny
2021-02-07 19:04 ` [f2fs-dev] [RFC PATCH 7/8] f2fs: use memcpy_from_page() in pagecache_read() Chaitanya Kulkarni
2021-02-07 19:04 ` [f2fs-dev] [RFC PATCH 8/8] f2fs: use memcpy_to_page() in pagecache_write() Chaitanya Kulkarni
2021-02-10 18:01   ` Eric Biggers
2021-02-10 19:41     ` Chaitanya Kulkarni
2021-02-07 19:10 ` [f2fs-dev] [RFC PATCH 0/8] use core page calls instead of kmaps Chaitanya Kulkarni
2021-02-08  4:42   ` Ira Weiny
2021-02-08  5:47     ` Chaitanya Kulkarni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210207190425.38107-6-chaitanya.kulkarni@wdc.com \
    --to=chaitanya.kulkarni@wdc.com \
    --cc=adilger.kernel@dilger.ca \
    --cc=axboe@kernel.dk \
    --cc=bvanassche@acm.org \
    --cc=clm@fb.com \
    --cc=damien.lemoal@wdc.com \
    --cc=dave.hansen@intel.com \
    --cc=dongli.zhang@oracle.com \
    --cc=dsterba@suse.com \
    --cc=ebiggers@kernel.org \
    --cc=hch@infradead.org \
    --cc=ira.weiny@intel.com \
    --cc=jaegeuk@kernel.org \
    --cc=johannes.thumshirn@wdc.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).