Lines Matching refs:FOLL_PIN
107 * FOLL_PIN or FOLL_GET behavior, when incrementing the folio's refcount.
109 * Either FOLL_PIN or FOLL_GET (or neither) must be set, but not both at the
115 * FOLL_PIN on large folios: folio's refcount will be incremented by
118 * FOLL_PIN on single-page folios: folio's refcount will be incremented by
123 * nor FOLL_PIN was set, that's considered failure, and furthermore,
130 if (WARN_ON_ONCE((flags & (FOLL_GET | FOLL_PIN)) == 0))
139 /* FOLL_PIN is set */
153 * Can't do FOLL_LONGTERM + FOLL_PIN gup fast path if not in a
191 if (flags & FOLL_PIN) {
213 * FOLL_PIN or FOLL_GET behavior, when incrementing the page's refcount.
215 * Either FOLL_PIN or FOLL_GET (or neither) may be set, but not both at the same
219 * Return: 0 for success, or if no action was required (if neither FOLL_PIN
222 * -ENOMEM FOLL_GET or FOLL_PIN was set, but the page could not
237 else if (flags & FOLL_PIN) {
275 gup_put_folio(page_folio(page), 1, FOLL_PIN);
398 gup_put_folio(folio, nr, FOLL_PIN);
438 gup_put_folio(folio, nr, FOLL_PIN);
456 gup_put_folio(folio, nr, FOLL_PIN);
486 gup_put_folio(folio, nr, FOLL_PIN);
589 /* FOLL_GET and FOLL_PIN are mutually exclusive. */
590 if (WARN_ON_ONCE((flags & (FOLL_PIN | FOLL_GET)) ==
591 (FOLL_PIN | FOLL_GET)))
615 if (!page && pte_devmap(pte) && (flags & (FOLL_GET | FOLL_PIN))) {
617 * Only return device mapping pages in the FOLL_GET or FOLL_PIN
647 VM_BUG_ON_PAGE((flags & FOLL_PIN) && PageAnon(page) &&
650 /* try_grab_page() does nothing unless FOLL_GET or FOLL_PIN is set. */
659 * to access its content (the FOLL_PIN case). Please see
662 if (flags & FOLL_PIN) {
801 * relevant with FOLL_PIN and !FOLL_WRITE.
844 if (WARN_ON_ONCE(foll_flags & FOLL_PIN))
1019 if ((gup_flags & (FOLL_PIN | FOLL_LONGTERM)) !=
1020 (FOLL_PIN | FOLL_LONGTERM))
1198 VM_BUG_ON(!!pages != !!(gup_flags & (FOLL_GET | FOLL_PIN)));
1487 if (flags & FOLL_PIN)
1491 * FOLL_PIN and FOLL_GET are mutually exclusive. Traditional behavior
1494 * for FOLL_GET, not for the newer FOLL_PIN.
1496 * FOLL_PIN always expects pages to be non-null, but no need to assert
1499 if (pages && !(flags & FOLL_PIN))
2097 gup_put_folio(folio, 1, FOLL_PIN);
2147 * pages in the range are required to be pinned via FOLL_PIN, before calling
2152 * -EAGAIN. The caller should re-pin the entire range with FOLL_PIN and then
2211 /* FOLL_LONGTERM implies FOLL_PIN */
2230 * - FOLL_PIN/FOLL_TRIED/FOLL_FAST_ONLY are internal only
2234 if (WARN_ON_ONCE(gup_flags & (FOLL_PIN | FOLL_TRIED | FOLL_UNLOCKABLE |
2247 /* FOLL_GET and FOLL_PIN are mutually exclusive. */
2248 if (WARN_ON_ONCE((gup_flags & (FOLL_PIN | FOLL_GET)) ==
2249 (FOLL_PIN | FOLL_GET)))
2253 if (WARN_ON_ONCE(!(gup_flags & FOLL_PIN) && (gup_flags & FOLL_LONGTERM)))
2257 if (WARN_ON_ONCE((gup_flags & (FOLL_GET | FOLL_PIN)) && !pages))
2469 if ((flags & (FOLL_PIN | FOLL_LONGTERM | FOLL_WRITE)) !=
2470 (FOLL_PIN | FOLL_LONGTERM | FOLL_WRITE))
2528 if (flags & FOLL_PIN)
2626 * going to access its content (the FOLL_PIN case). Please
2630 if (flags & FOLL_PIN) {
3129 if (gup_flags & FOLL_PIN) {
3154 if (gup_flags & FOLL_PIN) {
3176 FOLL_FORCE | FOLL_PIN | FOLL_GET |
3181 if (gup_flags & FOLL_PIN)
3294 * Nearly the same as get_user_pages_fast(), except that FOLL_PIN is set. See
3298 * FOLL_PIN means that the pages must be released via unpin_user_page(). Please
3307 if (!is_valid_gup_args(pages, NULL, &gup_flags, FOLL_PIN))
3326 * Nearly the same as get_user_pages_remote(), except that FOLL_PIN is set. See
3330 * FOLL_PIN means that the pages must be released via unpin_user_page(). Please
3344 FOLL_PIN | FOLL_TOUCH | FOLL_REMOTE))
3362 * FOLL_PIN is set.
3364 * FOLL_PIN means that the pages must be released via unpin_user_page(). Please
3375 if (!is_valid_gup_args(pages, NULL, &gup_flags, FOLL_PIN))
3383 * pin_user_pages_unlocked() is the FOLL_PIN variant of
3385 * FOLL_PIN and rejects FOLL_GET.
3396 FOLL_PIN | FOLL_TOUCH | FOLL_UNLOCKABLE))