Lines Matching refs:ci
353 struct swap_cluster_info *ci; in lock_cluster() local
355 ci = si->cluster_info; in lock_cluster()
356 if (ci) { in lock_cluster()
357 ci += offset / SWAPFILE_CLUSTER; in lock_cluster()
358 spin_lock(&ci->lock); in lock_cluster()
360 return ci; in lock_cluster()
363 static inline void unlock_cluster(struct swap_cluster_info *ci) in unlock_cluster() argument
365 if (ci) in unlock_cluster()
366 spin_unlock(&ci->lock); in unlock_cluster()
376 struct swap_cluster_info *ci; in lock_cluster_or_swap_info() local
379 ci = lock_cluster(si, offset); in lock_cluster_or_swap_info()
381 if (!ci) in lock_cluster_or_swap_info()
384 return ci; in lock_cluster_or_swap_info()
388 struct swap_cluster_info *ci) in unlock_cluster_or_swap_info() argument
390 if (ci) in unlock_cluster_or_swap_info()
391 unlock_cluster(ci); in unlock_cluster_or_swap_info()
413 struct swap_cluster_info *ci, in cluster_list_add_tail() argument
427 ci_tail = ci + tail; in cluster_list_add_tail()
436 struct swap_cluster_info *ci) in cluster_list_del_first() argument
446 cluster_next(&ci[idx]), 0); in cluster_list_del_first()
471 struct swap_cluster_info *ci = si->cluster_info; in __free_cluster() local
473 cluster_set_flag(ci + idx, CLUSTER_FLAG_FREE); in __free_cluster()
474 cluster_list_add_tail(&si->free_clusters, ci, idx); in __free_cluster()
483 struct swap_cluster_info *info, *ci; in swap_do_scheduled_discard() local
496 ci = lock_cluster(si, idx * SWAPFILE_CLUSTER); in swap_do_scheduled_discard()
500 unlock_cluster(ci); in swap_do_scheduled_discard()
525 struct swap_cluster_info *ci = si->cluster_info; in alloc_cluster() local
528 cluster_list_del_first(&si->free_clusters, ci); in alloc_cluster()
529 cluster_set_count_flag(ci + idx, 0, 0); in alloc_cluster()
534 struct swap_cluster_info *ci = si->cluster_info + idx; in free_cluster() local
536 VM_BUG_ON(cluster_count(ci) != 0); in free_cluster()
623 struct swap_cluster_info *ci; in scan_swap_map_try_ssd_cluster() local
655 ci = lock_cluster(si, tmp); in scan_swap_map_try_ssd_cluster()
661 unlock_cluster(ci); in scan_swap_map_try_ssd_cluster()
783 struct swap_cluster_info *ci; in scan_swap_map_slots() local
875 ci = lock_cluster(si, offset); in scan_swap_map_slots()
879 unlock_cluster(ci); in scan_swap_map_slots()
890 unlock_cluster(ci); in scan_swap_map_slots()
898 unlock_cluster(ci); in scan_swap_map_slots()
999 struct swap_cluster_info *ci; in swap_alloc_cluster() local
1016 ci = lock_cluster(si, offset); in swap_alloc_cluster()
1018 cluster_set_count_flag(ci, SWAPFILE_CLUSTER, CLUSTER_FLAG_HUGE); in swap_alloc_cluster()
1021 unlock_cluster(ci); in swap_alloc_cluster()
1031 struct swap_cluster_info *ci; in swap_free_cluster() local
1033 ci = lock_cluster(si, offset); in swap_free_cluster()
1035 cluster_set_count_flag(ci, 0, 0); in swap_free_cluster()
1037 unlock_cluster(ci); in swap_free_cluster()
1305 struct swap_cluster_info *ci; in __swap_entry_free() local
1309 ci = lock_cluster_or_swap_info(p, offset); in __swap_entry_free()
1311 unlock_cluster_or_swap_info(p, ci); in __swap_entry_free()
1320 struct swap_cluster_info *ci; in swap_entry_free() local
1324 ci = lock_cluster(p, offset); in swap_entry_free()
1329 unlock_cluster(ci); in swap_entry_free()
1355 struct swap_cluster_info *ci; in put_swap_page() local
1366 ci = lock_cluster_or_swap_info(si, offset); in put_swap_page()
1368 VM_BUG_ON(!cluster_is_huge(ci)); in put_swap_page()
1376 cluster_clear_huge(ci); in put_swap_page()
1378 unlock_cluster_or_swap_info(si, ci); in put_swap_page()
1388 unlock_cluster_or_swap_info(si, ci); in put_swap_page()
1395 unlock_cluster_or_swap_info(si, ci); in put_swap_page()
1402 struct swap_cluster_info *ci; in split_swap_cluster() local
1408 ci = lock_cluster(si, offset); in split_swap_cluster()
1409 cluster_clear_huge(ci); in split_swap_cluster()
1410 unlock_cluster(ci); in split_swap_cluster()
1459 struct swap_cluster_info *ci; in page_swapcount() local
1467 ci = lock_cluster_or_swap_info(p, offset); in page_swapcount()
1469 unlock_cluster_or_swap_info(p, ci); in page_swapcount()
1492 struct swap_cluster_info *ci; in swap_swapcount() local
1494 ci = lock_cluster_or_swap_info(si, offset); in swap_swapcount()
1496 unlock_cluster_or_swap_info(si, ci); in swap_swapcount()
1526 struct swap_cluster_info *ci; in swp_swapcount() local
1537 ci = lock_cluster_or_swap_info(p, offset); in swp_swapcount()
1560 unlock_cluster_or_swap_info(p, ci); in swp_swapcount()
1567 struct swap_cluster_info *ci; in swap_page_trans_huge_swapped() local
1574 ci = lock_cluster_or_swap_info(si, offset); in swap_page_trans_huge_swapped()
1575 if (!ci || !cluster_is_huge(ci)) { in swap_page_trans_huge_swapped()
1587 unlock_cluster_or_swap_info(si, ci); in swap_page_trans_huge_swapped()
1613 struct swap_cluster_info *ci = NULL; in page_trans_huge_map_swapcount() local
1643 ci = lock_cluster(si, offset); in page_trans_huge_map_swapcount()
1653 unlock_cluster(ci); in page_trans_huge_map_swapcount()
3241 unsigned long ci, nr_cluster; in SYSCALL_DEFINE2() local
3266 for (ci = 0; ci < nr_cluster; ci++) in SYSCALL_DEFINE2()
3267 spin_lock_init(&((cluster_info + ci)->lock)); in SYSCALL_DEFINE2()
3440 struct swap_cluster_info *ci; in __swap_duplicate() local
3451 ci = lock_cluster_or_swap_info(p, offset); in __swap_duplicate()
3494 unlock_cluster_or_swap_info(p, ci); in __swap_duplicate()
3583 struct swap_cluster_info *ci; in add_swap_count_continuation() local
3609 ci = lock_cluster(si, offset); in add_swap_count_continuation()
3674 unlock_cluster(ci); in add_swap_count_continuation()