mm: add FGP_DONTCACHE folio creation flag
authorJens Axboe <axboe@kernel.dk>
Sat, 9 Nov 2024 17:03:01 +0000 (10:03 -0700)
committerJens Axboe <axboe@kernel.dk>
Fri, 13 Dec 2024 15:29:01 +0000 (08:29 -0700)
commitacd8316c669257c294dac5c4b76a41ba139db64a
tree506990f84dfe6b782b75fcb60376ba0c762de79f
parentedd7b1c910c5251941c6ba179f44b4c81a089019
mm: add FGP_DONTCACHE folio creation flag

Callers can pass this in for uncached folio creation, in which case if
a folio is newly created it gets marked as uncached. If a folio exists
for this index and lookup succeeds, then it will not get marked as
uncached. If an !uncached lookup finds a cached folio, clear the flag.
For that case, there are competeting uncached and cached users of the
folio, and it should not get pruned.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
include/linux/pagemap.h
mm/filemap.c