Lines Matching full:locked
914 * FOLL_NOWAIT, the mmap_lock may be released. If it is, *@locked will be set
919 int *locked) in faultin_page() argument
964 *locked = 0; in faultin_page()
986 *locked = 0; in faultin_page()
1139 * @locked: whether we're still with the mmap_lock held
1174 * be released. If this happens *@locked will be set to 0 on return.
1187 int *locked) in __get_user_pages() argument
1240 PTR_ERR(page) == -EMLINK, locked); in __get_user_pages()
1452 * Locking: (*locked == 1) means that the mmap_lock has already been acquired by
1454 * set (*locked = 0).
1456 * (*locked == 0) means that the caller expects this function to acquire and
1457 * drop the mmap_lock. Therefore, the value of *locked will still be zero when
1468 int *locked, in __get_user_pages_locked() argument
1478 if (!*locked) { in __get_user_pages_locked()
1482 *locked = 1; in __get_user_pages_locked()
1505 locked); in __get_user_pages_locked()
1513 if (!*locked) { in __get_user_pages_locked()
1524 if (*locked) { in __get_user_pages_locked()
1567 *locked = 1; in __get_user_pages_locked()
1569 pages, locked); in __get_user_pages_locked()
1570 if (!*locked) { in __get_user_pages_locked()
1589 if (must_unlock && *locked) { in __get_user_pages_locked()
1596 *locked = 0; in __get_user_pages_locked()
1606 * @locked: whether the mmap_lock is still held
1615 * If @locked is NULL, it may be held for read or write and will
1618 * If @locked is non-NULL, it must held for read only and may be
1619 * released. If it's released, *@locked will be set to 0.
1622 unsigned long start, unsigned long end, int *locked) in populate_vma_page_range() argument
1659 if (locked) in populate_vma_page_range()
1667 NULL, locked ? locked : &local_locked); in populate_vma_page_range()
1682 * @locked: whether the mmap_lock is still held
1688 * covered by the VMA. If it's released, *@locked will be set to 0.
1691 unsigned long end, bool write, int *locked) in faultin_vma_page_range() argument
1725 NULL, locked); in faultin_vma_page_range()
1742 int locked = 0; in __mm_populate() local
1752 if (!locked) { in __mm_populate()
1753 locked = 1; in __mm_populate()
1775 ret = populate_vma_page_range(vma, nstart, nend, &locked); in __mm_populate()
1786 if (locked) in __mm_populate()
1793 int *locked, unsigned int foll_flags) in __get_user_pages_locked() argument
1807 if (!*locked) { in __get_user_pages_locked()
1811 *locked = 1; in __get_user_pages_locked()
1841 if (must_unlock && *locked) { in __get_user_pages_locked()
1843 *locked = 0; in __get_user_pages_locked()
2015 int locked = 0; in get_dump_page() local
2018 ret = __get_user_pages_locked(current->mm, addr, 1, &page, &locked, in get_dump_page()
2191 int *locked, in __gup_longterm_locked() argument
2199 locked, gup_flags); in __gup_longterm_locked()
2204 pages, locked, in __gup_longterm_locked()
2222 static bool is_valid_gup_args(struct page **pages, int *locked, in is_valid_gup_args() argument
2232 * - FOLL_UNLOCKABLE is internal only and used if locked is !NULL in is_valid_gup_args()
2239 if (locked) { in is_valid_gup_args()
2240 /* At the external interface locked must be set */ in is_valid_gup_args()
2241 if (WARN_ON_ONCE(*locked != 1)) in is_valid_gup_args()
2279 * @locked: pointer to lock flag indicating whether lock is held and
2329 int *locked) in get_user_pages_remote() argument
2333 if (!is_valid_gup_args(pages, locked, &gup_flags, in get_user_pages_remote()
2338 locked ? locked : &local_locked, in get_user_pages_remote()
2347 int *locked) in get_user_pages_remote() argument
2364 * the current task, and doesn't allow passing of a locked parameter. We also
2370 int locked = 1; in get_user_pages() local
2376 &locked, gup_flags); in get_user_pages()
2398 int locked = 0; in get_user_pages_unlocked() local
2405 &locked, gup_flags); in get_user_pages_unlocked()
3172 int locked = 0; in internal_get_user_pages_fast() local
3204 pages, &locked, in internal_get_user_pages_fast()
3322 * @locked: pointer to lock flag indicating whether lock is held and
3339 int *locked) in pin_user_pages_remote() argument
3343 if (!is_valid_gup_args(pages, locked, &gup_flags, in pin_user_pages_remote()
3347 locked ? locked : &local_locked, in pin_user_pages_remote()
3373 int locked = 1; in pin_user_pages() local
3378 pages, &locked, gup_flags); in pin_user_pages()
3393 int locked = 0; in pin_user_pages_unlocked() local
3400 &locked, gup_flags); in pin_user_pages_unlocked()