Lines Matching full:locked
1154 * FOLL_NOWAIT, the mmap_lock may be released. If it is, *@locked will be set
1159 int *locked) in faultin_page() argument
1204 *locked = 0; in faultin_page()
1226 *locked = 0; in faultin_page()
1379 * @locked: whether we're still with the mmap_lock held
1414 * be released. If this happens *@locked will be set to 0 on return.
1427 int *locked) in __get_user_pages() argument
1495 PTR_ERR(page) == -EMLINK, locked); in __get_user_pages()
1705 * Locking: (*locked == 1) means that the mmap_lock has already been acquired by
1707 * set (*locked = 0).
1709 * (*locked == 0) means that the caller expects this function to acquire and
1710 * drop the mmap_lock. Therefore, the value of *locked will still be zero when
1721 int *locked, in __get_user_pages_locked() argument
1734 if (!*locked) { in __get_user_pages_locked()
1738 *locked = 1; in __get_user_pages_locked()
1761 locked); in __get_user_pages_locked()
1769 if (!*locked) { in __get_user_pages_locked()
1780 if (*locked) { in __get_user_pages_locked()
1823 *locked = 1; in __get_user_pages_locked()
1825 pages, locked); in __get_user_pages_locked()
1826 if (!*locked) { in __get_user_pages_locked()
1845 if (must_unlock && *locked) { in __get_user_pages_locked()
1852 *locked = 0; in __get_user_pages_locked()
1870 * @locked: whether the mmap_lock is still held
1879 * If @locked is NULL, it may be held for read or write and will
1882 * If @locked is non-NULL, it must held for read only and may be
1883 * released. If it's released, *@locked will be set to 0.
1886 unsigned long start, unsigned long end, int *locked) in populate_vma_page_range() argument
1925 if (locked) in populate_vma_page_range()
1933 NULL, locked ? locked : &local_locked); in populate_vma_page_range()
1948 * @locked: whether the mmap_lock is still held
1957 * mm->mmap_lock must be held. If it's released, *@locked will be set to 0.
1960 unsigned long end, bool write, int *locked) in faultin_page_range() argument
1984 ret = __get_user_pages_locked(mm, start, nr_pages, NULL, locked, in faultin_page_range()
2002 int locked = 0; in __mm_populate() local
2012 if (!locked) { in __mm_populate()
2013 locked = 1; in __mm_populate()
2035 ret = populate_vma_page_range(vma, nstart, nend, &locked); in __mm_populate()
2046 if (locked) in __mm_populate()
2053 int *locked, unsigned int foll_flags) in __get_user_pages_locked() argument
2067 if (!*locked) { in __get_user_pages_locked()
2071 *locked = 1; in __get_user_pages_locked()
2101 if (must_unlock && *locked) { in __get_user_pages_locked()
2103 *locked = 0; in __get_user_pages_locked()
2275 int locked = 0; in get_dump_page() local
2278 ret = __get_user_pages_locked(current->mm, addr, 1, &page, &locked, in get_dump_page()
2519 int *locked, in __gup_longterm_locked() argument
2527 locked, gup_flags); in __gup_longterm_locked()
2532 pages, locked, in __gup_longterm_locked()
2550 static bool is_valid_gup_args(struct page **pages, int *locked, in is_valid_gup_args() argument
2560 * - FOLL_UNLOCKABLE is internal only and used if locked is !NULL in is_valid_gup_args()
2566 if (locked) { in is_valid_gup_args()
2567 /* At the external interface locked must be set */ in is_valid_gup_args()
2568 if (WARN_ON_ONCE(*locked != 1)) in is_valid_gup_args()
2606 * @locked: pointer to lock flag indicating whether lock is held and
2656 int *locked) in get_user_pages_remote() argument
2660 if (!is_valid_gup_args(pages, locked, &gup_flags, in get_user_pages_remote()
2665 locked ? locked : &local_locked, in get_user_pages_remote()
2674 int *locked) in get_user_pages_remote() argument
2691 * the current task, and doesn't allow passing of a locked parameter. We also
2697 int locked = 1; in get_user_pages() local
2703 &locked, gup_flags); in get_user_pages()
2725 int locked = 0; in get_user_pages_unlocked() local
2732 &locked, gup_flags); in get_user_pages_unlocked()
3396 int locked = 0; in gup_fast_fallback() local
3428 pages, &locked, in gup_fast_fallback()
3546 * @locked: pointer to lock flag indicating whether lock is held and
3563 int *locked) in pin_user_pages_remote() argument
3567 if (!is_valid_gup_args(pages, locked, &gup_flags, in pin_user_pages_remote()
3571 locked ? locked : &local_locked, in pin_user_pages_remote()
3597 int locked = 1; in pin_user_pages() local
3602 pages, &locked, gup_flags); in pin_user_pages()
3617 int locked = 0; in pin_user_pages_unlocked() local
3624 &locked, gup_flags); in pin_user_pages_unlocked()