[PATCH v8 01/26] mm/gup: factor out duplicate code from four routines