diff options
author | 2020-12-24 12:55:56 -0500 | |
---|---|---|
committer | 2021-10-18 07:49:41 -0400 | |
commit | b27652d935f41793c5e229a1e8b3a8bb3afe3cc1 (patch) | |
tree | d0a5062b4845c54721f9d99d653e85c78f2e2324 /include | |
parent | mm/filemap: Add filemap_get_folio (diff) | |
download | linux-b27652d935f41793c5e229a1e8b3a8bb3afe3cc1.tar.gz linux-b27652d935f41793c5e229a1e8b3a8bb3afe3cc1.tar.bz2 linux-b27652d935f41793c5e229a1e8b3a8bb3afe3cc1.zip |
mm/filemap: Add FGP_STABLE
Allow filemap_get_folio() to wait for writeback to complete (if the
filesystem wants that behaviour). This is the folio equivalent of
grab_cache_page_write_begin(), which is moved into the folio-compat
file as a reminder to migrate all the code using it. This paves the
way for getting rid of AOP_FLAG_NOFS once grab_cache_page_write_begin()
is removed.
Kernel grows by 11 bytes. filemap_get_folio() grows by 33 bytes but
grab_cache_page_write_begin() shrinks by 22 bytes to make up for it.
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: David Howells <dhowells@redhat.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/pagemap.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h index 401a90336a2c..b68b053e581f 100644 --- a/include/linux/pagemap.h +++ b/include/linux/pagemap.h @@ -301,6 +301,7 @@ pgoff_t page_cache_prev_miss(struct address_space *mapping, #define FGP_FOR_MMAP 0x00000040 #define FGP_HEAD 0x00000080 #define FGP_ENTRY 0x00000100 +#define FGP_STABLE 0x00000200 struct folio *__filemap_get_folio(struct address_space *mapping, pgoff_t index, int fgp_flags, gfp_t gfp); |