Lines Matching refs:locked

914  * FOLL_NOWAIT, the mmap_lock may be released.  If it is, *@locked will be set
919 int *locked)
964 *locked = 0;
986 *locked = 0;
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)
1240 PTR_ERR(page) == -EMLINK, locked);
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,
1478 if (!*locked) {
1482 *locked = 1;
1505 locked);
1513 if (!*locked) {
1524 if (*locked) {
1567 *locked = 1;
1569 pages, locked);
1570 if (!*locked) {
1589 if (must_unlock && *locked) {
1596 *locked = 0;
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)
1659 if (locked)
1667 NULL, locked ? locked : &local_locked);
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)
1725 NULL, locked);
1742 int locked = 0;
1752 if (!locked) {
1753 locked = 1;
1775 ret = populate_vma_page_range(vma, nstart, nend, &locked);
1786 if (locked)
1793 int *locked, unsigned int foll_flags)
1807 if (!*locked) {
1811 *locked = 1;
1841 if (must_unlock && *locked) {
1843 *locked = 0;
2015 int locked = 0;
2018 ret = __get_user_pages_locked(current->mm, addr, 1, &page, &locked,
2191 int *locked,
2199 locked, gup_flags);
2204 pages, locked,
2222 static bool is_valid_gup_args(struct page **pages, int *locked,
2232 * - FOLL_UNLOCKABLE is internal only and used if locked is !NULL
2239 if (locked) {
2240 /* At the external interface locked must be set */
2241 if (WARN_ON_ONCE(*locked != 1))
2279 * @locked: pointer to lock flag indicating whether lock is held and
2329 int *locked)
2333 if (!is_valid_gup_args(pages, locked, &gup_flags,
2338 locked ? locked : &local_locked,
2347 int *locked)
2364 * the current task, and doesn't allow passing of a locked parameter. We also
2370 int locked = 1;
2376 &locked, gup_flags);
2398 int locked = 0;
2405 &locked, gup_flags);
3172 int locked = 0;
3204 pages, &locked,
3322 * @locked: pointer to lock flag indicating whether lock is held and
3339 int *locked)
3343 if (!is_valid_gup_args(pages, locked, &gup_flags,
3347 locked ? locked : &local_locked,
3373 int locked = 1;
3378 pages, &locked, gup_flags);
3393 int locked = 0;
3400 &locked, gup_flags);