On Wed, Dec 22, 2021 at 11:00:40PM -0800, Christoph Hellwig wrote: > > -int put_and_wait_on_page_locked(struct page *page, int state); > > +int folio_put_wait_locked(struct folio *folio, int state); > > This could actually move to mm/internal.h. It doesn't have any callers outside mm/ for now (and actually a couple of the callers are going away), but conceptually it's part of the lock_page() family of functions. Some other places might benefit from waiting without the reference held.