While reviewing some of the other things going on around gup.c, I noticed that the documentation was wrong for a few of the routines that I wrote. And then I noticed that there was some significant code duplication too. So this fixes those issues. This is not entirely risk-free, but after looking closely at this, I think it's actually a useful improvement, getting rid of the code duplication here. The try_get_page() in particular seems better now, even if there are a few more "if" branches in there. However, it is possible I've overlooked something. I did some local LTP and other testing on an x86 test machine but failed to find any problems yet. Also, this is based on today's linux-next (next-20210806), in order to stay reasonably close to mmotm. So I know that this short series doesn't conflict with the folio-so-far patches in linux-next, anyway. John Hubbard (3): mm/gup: documentation corrections for gup/pup mm/gup: small refactoring: simplify try_grab_page() mm/gup: refactor and simplify try_get_page() include/linux/mm.h | 11 ++++++----- mm/gup.c | 49 ++++++++++++++-------------------------------- 2 files changed, 21 insertions(+), 39 deletions(-) -- 2.32.0