On Mon, Feb 14, 2022 at 09:43:53AM -0800, Stefan Roesch wrote: > @@ -1986,6 +1987,10 @@ struct folio *__filemap_get_folio(struct address_space *mapping, pgoff_t index, > gfp |= __GFP_WRITE; > if (fgp_flags & FGP_NOFS) > gfp &= ~__GFP_FS; > + if (fgp_flags & FGP_NOWAIT) { > + gfp |= GFP_ATOMIC; > + gfp &= ~__GFP_DIRECT_RECLAIM; > + } > > folio = filemap_alloc_folio(gfp, 0); No. FGP_NOWAIT means "Don't block on page lock". You can't redefine it to mean "Use GFP_ATOMIC" without changing all the existing callers. (Do not change the existing callers). __filemap_get_folio() already takes a gfp_t. There's no need for this.