aboutsummaryrefslogtreecommitdiffstats
path: root/mm/filemap.c
diff options
context:
space:
mode:
authorChristoph Hellwig <[email protected]>2023-03-07 14:34:09 +0000
committerAndrew Morton <[email protected]>2023-04-06 02:42:42 +0000
commit48c9d11375fc66f1e59d0e9b27d121e015a50904 (patch)
treeddbff60e826453cb9b79f2ea8c56666ed804b4f5 /mm/filemap.c
parentshmem: open code the page cache lookup in shmem_get_folio_gfp (diff)
downloadkernel-48c9d11375fc66f1e59d0e9b27d121e015a50904.tar.gz
kernel-48c9d11375fc66f1e59d0e9b27d121e015a50904.zip
mm: remove FGP_ENTRY
FGP_ENTRY is unused now, so remove it. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Christoph Hellwig <[email protected]> Cc: Andreas Gruenbacher <[email protected]> Cc: Hugh Dickins <[email protected]> Cc: Matthew Wilcox (Oracle) <[email protected]> Cc: Ryusuke Konishi <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
Diffstat (limited to 'mm/filemap.c')
-rw-r--r--mm/filemap.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/mm/filemap.c b/mm/filemap.c
index a674108a4d52..ac161b50f5bc 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -1891,8 +1891,6 @@ out:
*
* * %FGP_ACCESSED - The folio will be marked accessed.
* * %FGP_LOCK - The folio is returned locked.
- * * %FGP_ENTRY - If there is a shadow / swap / DAX entry, return it
- * instead of allocating a new folio to replace it.
* * %FGP_CREAT - If no page is present then a new page is allocated using
* @gfp and added to the page cache and the VM's LRU list.
* The page is returned locked and with an increased refcount.
@@ -1918,11 +1916,8 @@ struct folio *__filemap_get_folio(struct address_space *mapping, pgoff_t index,
repeat:
folio = filemap_get_entry(mapping, index);
- if (xa_is_value(folio)) {
- if (fgp_flags & FGP_ENTRY)
- return folio;
+ if (xa_is_value(folio))
folio = NULL;
- }
if (!folio)
goto no_page;