Lines Matching full:locked
1151 * FOLL_NOWAIT, the mmap_lock may be released. If it is, *@locked will be set
1156 int *locked) in faultin_page() argument
1201 *locked = 0; in faultin_page()
1223 *locked = 0; in faultin_page()
1376 * @locked: whether we're still with the mmap_lock held
1411 * be released. If this happens *@locked will be set to 0 on return.
1424 int *locked) in __get_user_pages() argument
1492 PTR_ERR(page) == -EMLINK, locked); in __get_user_pages()
1702 * Locking: (*locked == 1) means that the mmap_lock has already been acquired by
1704 * set (*locked = 0).
1706 * (*locked == 0) means that the caller expects this function to acquire and
1707 * drop the mmap_lock. Therefore, the value of *locked will still be zero when
1718 int *locked, in __get_user_pages_locked() argument
1731 if (!*locked) { in __get_user_pages_locked()
1735 *locked = 1; in __get_user_pages_locked()
1758 locked); in __get_user_pages_locked()
1766 if (!*locked) { in __get_user_pages_locked()
1777 if (*locked) { in __get_user_pages_locked()
1820 *locked = 1; in __get_user_pages_locked()
1822 pages, locked); in __get_user_pages_locked()
1823 if (!*locked) { in __get_user_pages_locked()
1842 if (must_unlock && *locked) { in __get_user_pages_locked()
1849 *locked = 0; in __get_user_pages_locked()
1867 * @locked: whether the mmap_lock is still held
1876 * If @locked is NULL, it may be held for read or write and will
1879 * If @locked is non-NULL, it must held for read only and may be
1880 * released. If it's released, *@locked will be set to 0.
1883 unsigned long start, unsigned long end, int *locked) in populate_vma_page_range() argument
1922 if (locked) in populate_vma_page_range()
1930 NULL, locked ? locked : &local_locked); in populate_vma_page_range()
1945 * @locked: whether the mmap_lock is still held
1954 * mm->mmap_lock must be held. If it's released, *@locked will be set to 0.
1957 unsigned long end, bool write, int *locked) in faultin_page_range() argument
1981 ret = __get_user_pages_locked(mm, start, nr_pages, NULL, locked, in faultin_page_range()
1999 int locked = 0; in __mm_populate() local
2009 if (!locked) { in __mm_populate()
2010 locked = 1; in __mm_populate()
2032 ret = populate_vma_page_range(vma, nstart, nend, &locked); in __mm_populate()
2043 if (locked) in __mm_populate()
2050 int *locked, unsigned int foll_flags) in __get_user_pages_locked() argument
2064 if (!*locked) { in __get_user_pages_locked()
2068 *locked = 1; in __get_user_pages_locked()
2098 if (must_unlock && *locked) { in __get_user_pages_locked()
2100 *locked = 0; in __get_user_pages_locked()
2257 * @locked: a pointer to an int denoting whether the mmap sem is held
2270 struct page *get_dump_page(unsigned long addr, int *locked) in get_dump_page() argument
2275 ret = __get_user_pages_locked(current->mm, addr, 1, &page, locked, in get_dump_page()
2516 int *locked, in __gup_longterm_locked() argument
2524 locked, gup_flags); in __gup_longterm_locked()
2529 pages, locked, in __gup_longterm_locked()
2547 static bool is_valid_gup_args(struct page **pages, int *locked, in is_valid_gup_args() argument
2557 * - FOLL_UNLOCKABLE is internal only and used if locked is !NULL in is_valid_gup_args()
2563 if (locked) { in is_valid_gup_args()
2564 /* At the external interface locked must be set */ in is_valid_gup_args()
2565 if (WARN_ON_ONCE(*locked != 1)) in is_valid_gup_args()
2603 * @locked: pointer to lock flag indicating whether lock is held and
2653 int *locked) in get_user_pages_remote() argument
2657 if (!is_valid_gup_args(pages, locked, &gup_flags, in get_user_pages_remote()
2662 locked ? locked : &local_locked, in get_user_pages_remote()
2671 int *locked) in get_user_pages_remote() argument
2688 * the current task, and doesn't allow passing of a locked parameter. We also
2694 int locked = 1; in get_user_pages() local
2700 &locked, gup_flags); in get_user_pages()
2722 int locked = 0; in get_user_pages_unlocked() local
2729 &locked, gup_flags); in get_user_pages_unlocked()
3388 int locked = 0; in gup_fast_fallback() local
3418 pages, &locked, in gup_fast_fallback()
3536 * @locked: pointer to lock flag indicating whether lock is held and
3553 int *locked) in pin_user_pages_remote() argument
3557 if (!is_valid_gup_args(pages, locked, &gup_flags, in pin_user_pages_remote()
3561 locked ? locked : &local_locked, in pin_user_pages_remote()
3587 int locked = 1; in pin_user_pages() local
3592 pages, &locked, gup_flags); in pin_user_pages()
3607 int locked = 0; in pin_user_pages_unlocked() local
3614 &locked, gup_flags); in pin_user_pages_unlocked()