Lines Matching full:locked
916 * FOLL_NOWAIT, the mmap_lock may be released. If it is, *@locked will be set
921 int *locked) in faultin_page() argument
966 *locked = 0; in faultin_page()
988 *locked = 0; in faultin_page()
1141 * @locked: whether we're still with the mmap_lock held
1176 * be released. If this happens *@locked will be set to 0 on return.
1189 int *locked) in __get_user_pages() argument
1242 PTR_ERR(page) == -EMLINK, locked); in __get_user_pages()
1454 * Locking: (*locked == 1) means that the mmap_lock has already been acquired by
1456 * set (*locked = 0).
1458 * (*locked == 0) means that the caller expects this function to acquire and
1459 * drop the mmap_lock. Therefore, the value of *locked will still be zero when
1470 int *locked, in __get_user_pages_locked() argument
1483 if (!*locked) { in __get_user_pages_locked()
1487 *locked = 1; in __get_user_pages_locked()
1510 locked); in __get_user_pages_locked()
1518 if (!*locked) { in __get_user_pages_locked()
1529 if (*locked) { in __get_user_pages_locked()
1572 *locked = 1; in __get_user_pages_locked()
1574 pages, locked); in __get_user_pages_locked()
1575 if (!*locked) { in __get_user_pages_locked()
1594 if (must_unlock && *locked) { in __get_user_pages_locked()
1601 *locked = 0; in __get_user_pages_locked()
1619 * @locked: whether the mmap_lock is still held
1628 * If @locked is NULL, it may be held for read or write and will
1631 * If @locked is non-NULL, it must held for read only and may be
1632 * released. If it's released, *@locked will be set to 0.
1635 unsigned long start, unsigned long end, int *locked) in populate_vma_page_range() argument
1672 if (locked) in populate_vma_page_range()
1680 NULL, locked ? locked : &local_locked); in populate_vma_page_range()
1695 * @locked: whether the mmap_lock is still held
1701 * covered by the VMA. If it's released, *@locked will be set to 0.
1704 unsigned long end, bool write, int *locked) in faultin_vma_page_range() argument
1738 NULL, locked); in faultin_vma_page_range()
1755 int locked = 0; in __mm_populate() local
1765 if (!locked) { in __mm_populate()
1766 locked = 1; in __mm_populate()
1788 ret = populate_vma_page_range(vma, nstart, nend, &locked); in __mm_populate()
1799 if (locked) in __mm_populate()
1806 int *locked, unsigned int foll_flags) in __get_user_pages_locked() argument
1820 if (!*locked) { in __get_user_pages_locked()
1824 *locked = 1; in __get_user_pages_locked()
1854 if (must_unlock && *locked) { in __get_user_pages_locked()
1856 *locked = 0; in __get_user_pages_locked()
2028 int locked = 0; in get_dump_page() local
2031 ret = __get_user_pages_locked(current->mm, addr, 1, &page, &locked, in get_dump_page()
2204 int *locked, in __gup_longterm_locked() argument
2212 locked, gup_flags); in __gup_longterm_locked()
2217 pages, locked, in __gup_longterm_locked()
2235 static bool is_valid_gup_args(struct page **pages, int *locked, in is_valid_gup_args() argument
2245 * - FOLL_UNLOCKABLE is internal only and used if locked is !NULL in is_valid_gup_args()
2251 if (locked) { in is_valid_gup_args()
2252 /* At the external interface locked must be set */ in is_valid_gup_args()
2253 if (WARN_ON_ONCE(*locked != 1)) in is_valid_gup_args()
2291 * @locked: pointer to lock flag indicating whether lock is held and
2341 int *locked) in get_user_pages_remote() argument
2345 if (!is_valid_gup_args(pages, locked, &gup_flags, in get_user_pages_remote()
2350 locked ? locked : &local_locked, in get_user_pages_remote()
2359 int *locked) in get_user_pages_remote() argument
2376 * the current task, and doesn't allow passing of a locked parameter. We also
2382 int locked = 1; in get_user_pages() local
2388 &locked, gup_flags); in get_user_pages()
2410 int locked = 0; in get_user_pages_unlocked() local
2417 &locked, gup_flags); in get_user_pages_unlocked()
3184 int locked = 0; in internal_get_user_pages_fast() local
3216 pages, &locked, in internal_get_user_pages_fast()
3334 * @locked: pointer to lock flag indicating whether lock is held and
3351 int *locked) in pin_user_pages_remote() argument
3355 if (!is_valid_gup_args(pages, locked, &gup_flags, in pin_user_pages_remote()
3359 locked ? locked : &local_locked, in pin_user_pages_remote()
3385 int locked = 1; in pin_user_pages() local
3390 pages, &locked, gup_flags); in pin_user_pages()
3405 int locked = 0; in pin_user_pages_unlocked() local
3412 &locked, gup_flags); in pin_user_pages_unlocked()