projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
68a5410
)
shmem: convert shmem_read_mapping_page_gfp() to use shmem_get_folio_gfp()
author
Matthew Wilcox (Oracle)
<willy@infradead.org>
Fri, 2 Sep 2022 19:46:19 +0000
(20:46 +0100)
committer
Andrew Morton
<akpm@linux-foundation.org>
Mon, 3 Oct 2022 21:02:48 +0000
(14:02 -0700)
Saves a couple of calls to compound_head().
Link:
https://lkml.kernel.org/r/20220902194653.1739778-24-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/shmem.c
patch
|
blob
|
history
diff --git
a/mm/shmem.c
b/mm/shmem.c
index 154432dc847b7a8335de762cef4c49f9747af8a3..c3e2a65a65fc2fb61dd1ce223910b564eb478255 100644
(file)
--- a/
mm/shmem.c
+++ b/
mm/shmem.c
@@
-4270,18
+4270,20
@@
struct page *shmem_read_mapping_page_gfp(struct address_space *mapping,
{
#ifdef CONFIG_SHMEM
struct inode *inode = mapping->host;
+ struct folio *folio;
struct page *page;
int error;
BUG_ON(!shmem_mapping(mapping));
- error = shmem_get
page_gfp(inode, index, &page
, SGP_CACHE,
+ error = shmem_get
_folio_gfp(inode, index, &folio
, SGP_CACHE,
gfp, NULL, NULL, NULL);
if (error)
return ERR_PTR(error);
- unlock_page(page);
+ folio_unlock(folio);
+ page = folio_file_page(folio, index);
if (PageHWPoison(page)) {
-
put_page(page
);
+
folio_put(folio
);
return ERR_PTR(-EIO);
}