Lines Matching refs:flags
213 unsigned long offset, unsigned long flags) in __try_to_reclaim_swap() argument
252 need_reclaim = ((flags & TTRS_ANYWAY) || in __try_to_reclaim_swap()
253 ((flags & TTRS_UNMAPPED) && !folio_mapped(folio)) || in __try_to_reclaim_swap()
254 ((flags & TTRS_FULL) && mem_cgroup_swap_full(folio))); in __try_to_reclaim_swap()
412 return info->flags == CLUSTER_FLAG_DISCARD; in cluster_is_discard()
417 if (unlikely(ci->flags > CLUSTER_FLAG_USABLE)) in cluster_is_usable()
462 VM_WARN_ON(ci->flags == new_flags); in move_cluster()
464 BUILD_BUG_ON(1 << sizeof(ci->flags) * BITS_PER_BYTE < CLUSTER_FLAG_MAX); in move_cluster()
468 if (ci->flags == CLUSTER_FLAG_NONE) in move_cluster()
474 if (ci->flags == CLUSTER_FLAG_FRAG) in move_cluster()
478 ci->flags = new_flags; in move_cluster()
485 VM_BUG_ON(ci->flags == CLUSTER_FLAG_FREE); in swap_cluster_schedule_discard()
513 if (unlikely(!(si->flags & SWP_WRITEOK))) in isolate_lock_cluster()
521 VM_BUG_ON(!ci->flags); in isolate_lock_cluster()
522 VM_BUG_ON(ci->flags > CLUSTER_FLAG_USABLE && in isolate_lock_cluster()
523 ci->flags != CLUSTER_FLAG_FULL); in isolate_lock_cluster()
526 ci->flags = CLUSTER_FLAG_NONE; in isolate_lock_cluster()
567 ci->flags = CLUSTER_FLAG_NONE; in swap_do_scheduled_discard()
601 VM_BUG_ON(ci->flags == CLUSTER_FLAG_FREE); in free_cluster()
609 if ((si->flags & (SWP_WRITEOK | SWP_PAGE_DISCARD)) == in free_cluster()
628 if (ci->flags != CLUSTER_FLAG_NONFULL) in partial_free_cluster()
648 if (ci->flags != CLUSTER_FLAG_FREE) in relocate_cluster()
651 if (ci->flags != CLUSTER_FLAG_FRAG) in relocate_cluster()
655 if (ci->flags != CLUSTER_FLAG_FULL) in relocate_cluster()
676 VM_BUG_ON(ci->flags); in inc_cluster_info_page()
753 if (!(si->flags & SWP_WRITEOK)) in cluster_alloc_range()
819 if (si->flags & SWP_SOLIDSTATE) { in alloc_swap_scan_cluster()
859 if (ci->flags == CLUSTER_FLAG_NONE) in swap_reclaim_full_clusters()
891 if (order && !(si->flags & SWP_BLKDEV)) in cluster_alloc_swap_entry()
894 if (!(si->flags & SWP_SOLIDSTATE)) { in cluster_alloc_swap_entry()
962 if ((si->flags & SWP_PAGE_DISCARD) && swap_do_scheduled_discard(si)) in cluster_alloc_swap_entry()
990 if (!(si->flags & SWP_SOLIDSTATE)) in cluster_alloc_swap_entry()
1011 si->flags &= ~SWP_WRITEOK; in del_from_avail_list()
1046 si->flags |= SWP_WRITEOK; in add_to_avail_list()
1048 if (!(READ_ONCE(si->flags) & SWP_WRITEOK)) in add_to_avail_list()
1137 if (si->flags & SWP_BLKDEV) in swap_range_free()
1333 if (data_race(!(si->flags & SWP_USED))) in _swap_info_get()
1867 if (si->flags & SWP_WRITEOK) { in get_swap_page_of_type()
1899 if (!(sis->flags & SWP_WRITEOK)) in swap_type_of()
1923 if (!(sis->flags & SWP_WRITEOK)) in find_first_swap()
1942 if (!si || !(si->flags & SWP_WRITEOK)) in swapdev_block()
1963 if (sis->flags & SWP_WRITEOK) { in count_swap_pages()
2425 if (sis->flags & SWP_ACTIVATED) { in destroy_swap_extents()
2429 sis->flags &= ~SWP_ACTIVATED; in destroy_swap_extents()
2526 sis->flags |= SWP_ACTIVATED; in setup_swap_extents()
2527 if ((sis->flags & SWP_FS_OPS) && in setup_swap_extents()
2644 BUG_ON(si->flags & SWP_WRITEOK); in wait_for_allocation()
2703 if (p->flags & SWP_WRITEOK) { in SYSCALL_DEFINE1()
2773 if (p->flags & SWP_CONTINUED) in SYSCALL_DEFINE1()
2820 p->flags = 0; in SYSCALL_DEFINE1()
2862 if (!(si->flags & SWP_USED) || !si->swap_map) in swap_start()
2883 if (!(si->flags & SWP_USED) || !si->swap_map) in swap_next()
2989 if (!(swap_info[type]->flags & SWP_USED)) in alloc_swap_info()
3018 p->flags = SWP_USED; in alloc_swap_info()
3043 si->flags |= SWP_BLKDEV; in claim_swapfile()
3192 if (!(si->flags & SWP_SOLIDSTATE)) { in setup_clusters()
3242 ci->flags = CLUSTER_FLAG_NONFULL; in setup_clusters()
3246 ci->flags = CLUSTER_FLAG_FREE; in setup_clusters()
3398 si->flags |= SWP_STABLE_WRITES; in SYSCALL_DEFINE2()
3401 si->flags |= SWP_SYNCHRONOUS_IO; in SYSCALL_DEFINE2()
3404 si->flags |= SWP_SOLIDSTATE; in SYSCALL_DEFINE2()
3425 si->flags |= (SWP_DISCARDABLE | SWP_AREA_DISCARD | in SYSCALL_DEFINE2()
3435 si->flags &= ~SWP_PAGE_DISCARD; in SYSCALL_DEFINE2()
3437 si->flags &= ~SWP_AREA_DISCARD; in SYSCALL_DEFINE2()
3440 if (si->flags & SWP_AREA_DISCARD) { in SYSCALL_DEFINE2()
3476 (si->flags & SWP_SOLIDSTATE) ? "SS" : "", in SYSCALL_DEFINE2()
3477 (si->flags & SWP_DISCARDABLE) ? "D" : "", in SYSCALL_DEFINE2()
3478 (si->flags & SWP_AREA_DISCARD) ? "s" : "", in SYSCALL_DEFINE2()
3479 (si->flags & SWP_PAGE_DISCARD) ? "c" : ""); in SYSCALL_DEFINE2()
3501 si->flags = 0; in SYSCALL_DEFINE2()
3529 if ((si->flags & SWP_USED) && !(si->flags & SWP_WRITEOK)) in si_swapinfo()
3749 si->flags |= SWP_CONTINUED; in add_swap_count_continuation()