folio-compat.c (236d93c4bf2d6da83241cc8e4625e89d9604cb43) folio-compat.c (b7446e7cf15f0926866c8e5de90ab278998bf8c8)
1/*
2 * Compatibility functions which bloat the callers too much to make inline.
3 * All of the callers of these functions should be converted to use folios
4 * eventually.
5 */
6
7#include <linux/migrate.h>
8#include <linux/pagemap.h>

--- 117 unchanged lines hidden (view full) ---

126 folio = __filemap_get_folio(mapping, index, fgp_flags, gfp);
127 if ((fgp_flags & FGP_HEAD) || !folio || xa_is_value(folio))
128 return &folio->page;
129 return folio_file_page(folio, index);
130}
131EXPORT_SYMBOL(pagecache_get_page);
132
133struct page *grab_cache_page_write_begin(struct address_space *mapping,
1/*
2 * Compatibility functions which bloat the callers too much to make inline.
3 * All of the callers of these functions should be converted to use folios
4 * eventually.
5 */
6
7#include <linux/migrate.h>
8#include <linux/pagemap.h>

--- 117 unchanged lines hidden (view full) ---

126 folio = __filemap_get_folio(mapping, index, fgp_flags, gfp);
127 if ((fgp_flags & FGP_HEAD) || !folio || xa_is_value(folio))
128 return &folio->page;
129 return folio_file_page(folio, index);
130}
131EXPORT_SYMBOL(pagecache_get_page);
132
133struct page *grab_cache_page_write_begin(struct address_space *mapping,
134 pgoff_t index, unsigned flags)
134 pgoff_t index)
135{
136 unsigned fgp_flags = FGP_LOCK | FGP_WRITE | FGP_CREAT | FGP_STABLE;
137
138 return pagecache_get_page(mapping, index, fgp_flags,
139 mapping_gfp_mask(mapping));
140}
141EXPORT_SYMBOL(grab_cache_page_write_begin);
142

--- 22 unchanged lines hidden ---
135{
136 unsigned fgp_flags = FGP_LOCK | FGP_WRITE | FGP_CREAT | FGP_STABLE;
137
138 return pagecache_get_page(mapping, index, fgp_flags,
139 mapping_gfp_mask(mapping));
140}
141EXPORT_SYMBOL(grab_cache_page_write_begin);
142

--- 22 unchanged lines hidden ---