summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wilcox (Oracle) <willy@infradead.org>2022-10-19 20:33:32 +0200
committerAndrew Morton <akpm@linux-foundation.org>2022-11-09 02:37:18 +0100
commitc5255b421fd04ba6a405809b7216a3b6ebd5493a (patch)
tree4b1f7019fd9c23385ab2cfb71df3f503f555fe8b
parentmm: convert find_get_incore_page() to filemap_get_incore_folio() (diff)
downloadlinux-c5255b421fd04ba6a405809b7216a3b6ebd5493a.tar.xz
linux-c5255b421fd04ba6a405809b7216a3b6ebd5493a.zip
mm: remove FGP_HEAD
This is no longer used; all callers have been converted to use folios instead. Somehow this manages to save 11 bytes of text. Link: https://lkml.kernel.org/r/20221019183332.2802139-5-willy@infradead.org Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-rw-r--r--include/linux/pagemap.h5
-rw-r--r--mm/folio-compat.c2
2 files changed, 3 insertions, 4 deletions
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h
index 060ee98474ef..b33ab86d5dca 100644
--- a/include/linux/pagemap.h
+++ b/include/linux/pagemap.h
@@ -504,9 +504,8 @@ pgoff_t page_cache_prev_miss(struct address_space *mapping,
#define FGP_NOFS 0x00000010
#define FGP_NOWAIT 0x00000020
#define FGP_FOR_MMAP 0x00000040
-#define FGP_HEAD 0x00000080
-#define FGP_ENTRY 0x00000100
-#define FGP_STABLE 0x00000200
+#define FGP_ENTRY 0x00000080
+#define FGP_STABLE 0x00000100
struct folio *__filemap_get_folio(struct address_space *mapping, pgoff_t index,
int fgp_flags, gfp_t gfp);
diff --git a/mm/folio-compat.c b/mm/folio-compat.c
index 8ae39c06da62..bac2a366aada 100644
--- a/mm/folio-compat.c
+++ b/mm/folio-compat.c
@@ -108,7 +108,7 @@ struct page *pagecache_get_page(struct address_space *mapping, pgoff_t index,
struct folio *folio;
folio = __filemap_get_folio(mapping, index, fgp_flags, gfp);
- if ((fgp_flags & FGP_HEAD) || !folio || xa_is_value(folio))
+ if (!folio || xa_is_value(folio))
return &folio->page;
return folio_file_page(folio, index);
}