[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20201124060755.1405602-13-ira.weiny@intel.com>
Date: Mon, 23 Nov 2020 22:07:50 -0800
From: ira.weiny@...el.com
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Ira Weiny <ira.weiny@...el.com>, Nicolas Pitre <nico@...xnic.net>,
Thomas Gleixner <tglx@...utronix.de>,
Dave Hansen <dave.hansen@...el.com>,
Matthew Wilcox <willy@...radead.org>,
Christoph Hellwig <hch@...radead.org>,
Dan Williams <dan.j.williams@...el.com>,
Al Viro <viro@...iv.linux.org.uk>,
Eric Biggers <ebiggers@...nel.org>,
Luis Chamberlain <mcgrof@...nel.org>,
Patrik Jakobsson <patrik.r.jakobsson@...il.com>,
Jani Nikula <jani.nikula@...ux.intel.com>,
Joonas Lahtinen <joonas.lahtinen@...ux.intel.com>,
Rodrigo Vivi <rodrigo.vivi@...el.com>,
David Howells <dhowells@...hat.com>, Chris Mason <clm@...com>,
Josef Bacik <josef@...icpanda.com>,
David Sterba <dsterba@...e.com>,
Steve French <sfrench@...ba.org>,
Jaegeuk Kim <jaegeuk@...nel.org>, Chao Yu <yuchao0@...wei.com>,
"Martin K. Petersen" <martin.petersen@...cle.com>,
Brian King <brking@...ibm.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Jérôme Glisse <jglisse@...hat.com>,
Kirti Wankhede <kwankhede@...dia.com>,
linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: [PATCH 12/17] fs/cramfs: Use memcpy_from_page()
From: Ira Weiny <ira.weiny@...el.com>
Remove open coded kmap/memcpy/kunmap and use mempcy_from_page() instead.
Cc: Nicolas Pitre <nico@...xnic.net>
Signed-off-by: Ira Weiny <ira.weiny@...el.com>
---
fs/cramfs/inode.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs/cramfs/inode.c b/fs/cramfs/inode.c
index 4b90cfd1ec36..996a3a32a01f 100644
--- a/fs/cramfs/inode.c
+++ b/fs/cramfs/inode.c
@@ -247,8 +247,7 @@ static void *cramfs_blkdev_read(struct super_block *sb, unsigned int offset,
struct page *page = pages[i];
if (page) {
- memcpy(data, kmap(page), PAGE_SIZE);
- kunmap(page);
+ memcpy_from_page(data, page, 0, PAGE_SIZE);
put_page(page);
} else
memset(data, 0, PAGE_SIZE);
--
2.28.0.rc0.12.gb6a658bd00c9
Powered by blists - more mailing lists