Lines Matching full:locked
826 * FOLL_NOWAIT, the mmap_lock may be released. If it is, *@locked will be set
831 int *locked) in faultin_page() argument
876 *locked = 0; in faultin_page()
898 *locked = 0; in faultin_page()
1051 * @locked: whether we're still with the mmap_lock held
1086 * be released. If this happens *@locked will be set to 0 on return.
1099 int *locked) in __get_user_pages() argument
1168 PTR_ERR(page) == -EMLINK, locked); in __get_user_pages()
1379 * Locking: (*locked == 1) means that the mmap_lock has already been acquired by
1381 * set (*locked = 0).
1383 * (*locked == 0) means that the caller expects this function to acquire and
1384 * drop the mmap_lock. Therefore, the value of *locked will still be zero when
1395 int *locked, in __get_user_pages_locked() argument
1405 if (!*locked) { in __get_user_pages_locked()
1409 *locked = 1; in __get_user_pages_locked()
1432 locked); in __get_user_pages_locked()
1440 if (!*locked) { in __get_user_pages_locked()
1451 if (*locked) { in __get_user_pages_locked()
1494 *locked = 1; in __get_user_pages_locked()
1496 pages, locked); in __get_user_pages_locked()
1497 if (!*locked) { in __get_user_pages_locked()
1516 if (must_unlock && *locked) { in __get_user_pages_locked()
1523 *locked = 0; in __get_user_pages_locked()
1533 * @locked: whether the mmap_lock is still held
1542 * If @locked is NULL, it may be held for read or write and will
1545 * If @locked is non-NULL, it must held for read only and may be
1546 * released. If it's released, *@locked will be set to 0.
1549 unsigned long start, unsigned long end, int *locked) in populate_vma_page_range() argument
1586 if (locked) in populate_vma_page_range()
1594 NULL, locked ? locked : &local_locked); in populate_vma_page_range()
1609 * @locked: whether the mmap_lock is still held
1618 * mm->mmap_lock must be held. If it's released, *@locked will be set to 0.
1621 unsigned long end, bool write, int *locked) in faultin_page_range() argument
1645 ret = __get_user_pages_locked(mm, start, nr_pages, NULL, locked, in faultin_page_range()
1663 int locked = 0; in __mm_populate() local
1673 if (!locked) { in __mm_populate()
1674 locked = 1; in __mm_populate()
1696 ret = populate_vma_page_range(vma, nstart, nend, &locked); in __mm_populate()
1707 if (locked) in __mm_populate()
1714 int *locked, unsigned int foll_flags) in __get_user_pages_locked() argument
1728 if (!*locked) { in __get_user_pages_locked()
1732 *locked = 1; in __get_user_pages_locked()
1762 if (must_unlock && *locked) { in __get_user_pages_locked()
1764 *locked = 0; in __get_user_pages_locked()
1936 int locked = 0; in get_dump_page() local
1939 ret = __get_user_pages_locked(current->mm, addr, 1, &page, &locked, in get_dump_page()
2112 int *locked, in __gup_longterm_locked() argument
2120 locked, gup_flags); in __gup_longterm_locked()
2125 pages, locked, in __gup_longterm_locked()
2143 static bool is_valid_gup_args(struct page **pages, int *locked, in is_valid_gup_args() argument
2153 * - FOLL_UNLOCKABLE is internal only and used if locked is !NULL in is_valid_gup_args()
2159 if (locked) { in is_valid_gup_args()
2160 /* At the external interface locked must be set */ in is_valid_gup_args()
2161 if (WARN_ON_ONCE(*locked != 1)) in is_valid_gup_args()
2199 * @locked: pointer to lock flag indicating whether lock is held and
2249 int *locked) in get_user_pages_remote() argument
2253 if (!is_valid_gup_args(pages, locked, &gup_flags, in get_user_pages_remote()
2258 locked ? locked : &local_locked, in get_user_pages_remote()
2267 int *locked) in get_user_pages_remote() argument
2284 * the current task, and doesn't allow passing of a locked parameter. We also
2290 int locked = 1; in get_user_pages() local
2296 &locked, gup_flags); in get_user_pages()
2318 int locked = 0; in get_user_pages_unlocked() local
2325 &locked, gup_flags); in get_user_pages_unlocked()
3188 int locked = 0; in internal_get_user_pages_fast() local
3220 pages, &locked, in internal_get_user_pages_fast()
3338 * @locked: pointer to lock flag indicating whether lock is held and
3355 int *locked) in pin_user_pages_remote() argument
3359 if (!is_valid_gup_args(pages, locked, &gup_flags, in pin_user_pages_remote()
3363 locked ? locked : &local_locked, in pin_user_pages_remote()
3389 int locked = 1; in pin_user_pages() local
3394 pages, &locked, gup_flags); in pin_user_pages()
3409 int locked = 0; in pin_user_pages_unlocked() local
3416 &locked, gup_flags); in pin_user_pages_unlocked()