Lines Matching refs:locked

530 		 * If the page is already locked, we don't need to
862 * mmap_lock must be held on entry. If @locked != NULL and *@flags
864 * is, *@locked will be set to 0 and -EBUSY returned.
867 unsigned long address, unsigned int *flags, int *locked)
879 if (locked)
901 if (locked && !(fault_flags & FAULT_FLAG_RETRY_NOWAIT))
902 *locked = 0;
978 * @locked: whether we're still with the mmap_lock held
1014 * If @locked != NULL, *@locked will be set to 0 when mmap_lock is
1018 * A caller using such a combination of @locked and @gup_flags
1030 struct vm_area_struct **vmas, int *locked)
1076 gup_flags, locked);
1077 if (locked && *locked == 0) {
1103 ret = faultin_page(vma, start, &foll_flags, locked);
1258 int *locked,
1264 if (locked) {
1267 /* check caller initialized locked */
1268 BUG_ON(*locked != 1);
1290 vmas, locked);
1291 if (!locked)
1296 if (!*locked) {
1307 if (*locked) {
1348 *locked = 1;
1350 pages, NULL, locked);
1351 if (!*locked) {
1370 if (lock_dropped && *locked) {
1376 *locked = 0;
1386 * @locked: whether the mmap_lock is still held
1395 * If @locked is NULL, it may be held for read or write and will
1398 * If @locked is non-NULL, it must held for read only and may be
1399 * released. If it's released, *@locked will be set to 0.
1402 unsigned long start, unsigned long end, int *locked)
1437 NULL, NULL, locked);
1452 int locked = 0;
1462 if (!locked) {
1463 locked = 1;
1484 ret = populate_vma_page_range(vma, nstart, nend, &locked);
1495 if (locked)
1502 struct vm_area_struct **vmas, int *locked,
1563 int locked = 1;
1568 ret = __get_user_pages_locked(mm, addr, 1, &page, NULL, &locked,
1570 if (locked)
1795 struct vm_area_struct **vmas, int *locked)
1800 * vmas. However, this only comes up if locked is set, and there are
1801 * callers that do request FOLL_LONGTERM, but do not set locked. So,
1805 if (WARN_ON_ONCE(locked))
1817 locked,
1832 * @locked: pointer to lock flag indicating whether lock is held and
1884 struct vm_area_struct **vmas, int *locked)
1890 pages, vmas, locked);
1898 struct vm_area_struct **vmas, int *locked)
1906 struct vm_area_struct **vmas, int *locked)
1925 * the current task, and doesn't allow passing of a locked parameter. We also
1950 * int locked = 1;
1953 * get_user_pages_locked(mm, ..., pages, &locked);
1954 * if (locked)
1963 * @locked: pointer to lock flag indicating whether lock is held and
1974 int *locked)
1992 pages, NULL, locked,
2016 int locked = 1;
2030 &locked, gup_flags | FOLL_TOUCH);
2031 if (locked)
2938 * @locked: pointer to lock flag indicating whether lock is held and
2952 struct vm_area_struct **vmas, int *locked)
2960 pages, vmas, locked);
3020 int *locked)
3037 pages, NULL, locked,