fs: Add FGP_WRITEBEGIN
authorMatthew Wilcox <willy@infradead.org>
Fri, 24 Mar 2023 18:01:01 +0000 (18:01 +0000)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 6 Apr 2023 17:39:50 +0000 (13:39 -0400)
commite999a5c5a19cf3b679f3d93c49ad5f5c04e4806c
tree712cf4371e6126d1c4159078c3e00b02815d7848
parent361eb69fc99f1a8f1d653d69ecd742f3cbb896be
fs: Add FGP_WRITEBEGIN

This particular combination of flags is used by most filesystems
in their ->write_begin method, although it does find use in a
few other places.  Before folios, it warranted its own function
(grab_cache_page_write_begin()), but I think that just having specialised
flags is enough.  It certainly helps the few places that have been
converted from grab_cache_page_write_begin() to __filemap_get_folio().

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Link: https://lore.kernel.org/r/20230324180129.1220691-2-willy@infradead.org
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/move_extent.c
fs/iomap/buffered-io.c
fs/netfs/buffered_read.c
fs/nfs/file.c
include/linux/pagemap.h
mm/folio-compat.c