Jason Gunthorpe <jgg@xxxxxxxxxx> wrote: > Isn't that this: > > if (cleanup_flags & PAGE_CLEANUP_NEEDED) > gup_put_folio(folio, 1, cleanup_flags & PAGE_CLEANUP_UNPIN) > > > ? Yes. As claimed, that would be three states. > Three states - decr get, decr pinned, do nothing? Yes. Don't worry about it. I'm not going to do it in gup.c. David