Lines Matching full:spinlock

24 #include <linux/spinlock.h>
153 * when it is created, and since the dlm->spinlock is held at
166 assert_spin_locked(&dlm->spinlock); in __dlm_mle_attach_hb_events()
183 spin_lock(&dlm->spinlock); in dlm_mle_detach_hb_events()
185 spin_unlock(&dlm->spinlock); in dlm_mle_detach_hb_events()
193 assert_spin_locked(&dlm->spinlock); in dlm_get_mle_inuse()
204 spin_lock(&dlm->spinlock); in dlm_put_mle_inuse()
209 spin_unlock(&dlm->spinlock); in dlm_put_mle_inuse()
219 assert_spin_locked(&dlm->spinlock); in __dlm_put_mle()
238 spin_lock(&dlm->spinlock); in dlm_put_mle()
242 spin_unlock(&dlm->spinlock); in dlm_put_mle()
257 assert_spin_locked(&dlm->spinlock); in dlm_init_mle()
264 spin_lock_init(&mle->spinlock); in dlm_init_mle()
306 assert_spin_locked(&dlm->spinlock); in __dlm_unlink_mle()
350 assert_spin_locked(&dlm->spinlock); in dlm_hb_event_notify_attached()
364 spin_lock(&mle->spinlock); in dlm_mle_node_down()
371 spin_unlock(&mle->spinlock); in dlm_mle_node_down()
378 spin_lock(&mle->spinlock); in dlm_mle_node_up()
385 spin_unlock(&mle->spinlock); in dlm_mle_node_up()
413 assert_spin_locked(&dlm->spinlock); in dlm_mle_release()
427 /* NOTE: kfree under spinlock here. in dlm_mle_release()
542 spin_lock_init(&res->spinlock); in dlm_init_lockres()
564 spin_lock(&res->spinlock); in dlm_init_lockres()
566 spin_unlock(&res->spinlock); in dlm_init_lockres()
606 assert_spin_locked(&res->spinlock); in dlm_lockres_set_refmap_bit()
617 assert_spin_locked(&res->spinlock); in dlm_lockres_clear_refmap_bit()
638 assert_spin_locked(&res->spinlock); in dlm_lockres_grab_inflight_ref()
645 assert_spin_locked(&res->spinlock); in dlm_lockres_drop_inflight_ref()
661 assert_spin_locked(&res->spinlock); in __dlm_lockres_grab_inflight_worker()
671 assert_spin_locked(&res->spinlock); in __dlm_lockres_drop_inflight_worker()
682 spin_lock(&res->spinlock); in dlm_lockres_drop_inflight_worker()
684 spin_unlock(&res->spinlock); in dlm_lockres_drop_inflight_worker()
725 spin_lock(&dlm->spinlock); in dlm_get_lock_resource()
728 spin_unlock(&dlm->spinlock); in dlm_get_lock_resource()
729 spin_lock(&tmpres->spinlock); in dlm_get_lock_resource()
732 * Right after dlm spinlock was released, dlm_thread could have in dlm_get_lock_resource()
737 spin_unlock(&tmpres->spinlock); in dlm_get_lock_resource()
747 spin_unlock(&tmpres->spinlock); in dlm_get_lock_resource()
758 spin_unlock(&tmpres->spinlock); in dlm_get_lock_resource()
767 spin_unlock(&tmpres->spinlock); in dlm_get_lock_resource()
785 spin_unlock(&dlm->spinlock); in dlm_get_lock_resource()
802 spin_lock(&res->spinlock); in dlm_get_lock_resource()
806 spin_unlock(&res->spinlock); in dlm_get_lock_resource()
807 spin_unlock(&dlm->spinlock); in dlm_get_lock_resource()
840 spin_unlock(&dlm->spinlock); in dlm_get_lock_resource()
862 /* still holding the dlm spinlock, check the recovery map in dlm_get_lock_resource()
883 /* since this lockres is new it doesn't not require the spinlock */ in dlm_get_lock_resource()
892 spin_unlock(&dlm->spinlock); in dlm_get_lock_resource()
897 * dlm spinlock would be detectable be a change on the mle, in dlm_get_lock_resource()
916 spin_lock(&dlm->spinlock); in dlm_get_lock_resource()
925 spin_unlock(&dlm->spinlock); in dlm_get_lock_resource()
987 spin_lock(&res->spinlock); in dlm_get_lock_resource()
989 spin_unlock(&res->spinlock); in dlm_get_lock_resource()
1018 spin_lock(&res->spinlock); in dlm_wait_for_lock_mastery()
1022 spin_unlock(&res->spinlock); in dlm_wait_for_lock_mastery()
1037 spin_unlock(&res->spinlock); in dlm_wait_for_lock_mastery()
1039 spin_lock(&mle->spinlock); in dlm_wait_for_lock_mastery()
1059 spin_unlock(&mle->spinlock); in dlm_wait_for_lock_mastery()
1100 spin_unlock(&mle->spinlock); in dlm_wait_for_lock_mastery()
1139 spin_lock(&res->spinlock); in dlm_wait_for_lock_mastery()
1143 spin_unlock(&res->spinlock); in dlm_wait_for_lock_mastery()
1221 assert_spin_locked(&mle->spinlock); in dlm_restart_lock_mastery()
1354 spin_lock(&mle->spinlock); in dlm_do_master_request()
1382 spin_unlock(&mle->spinlock); in dlm_do_master_request()
1395 * dlm->spinlock
1396 * res->spinlock
1397 * mle->spinlock
1435 spin_lock(&dlm->spinlock); in dlm_master_request_handler()
1438 spin_unlock(&dlm->spinlock); in dlm_master_request_handler()
1441 spin_lock(&res->spinlock); in dlm_master_request_handler()
1444 * Right after dlm spinlock was released, dlm_thread could have in dlm_master_request_handler()
1449 spin_unlock(&res->spinlock); in dlm_master_request_handler()
1456 spin_unlock(&res->spinlock); in dlm_master_request_handler()
1467 spin_unlock(&res->spinlock); in dlm_master_request_handler()
1481 spin_unlock(&res->spinlock); in dlm_master_request_handler()
1506 spin_lock(&tmpmle->spinlock); in dlm_master_request_handler()
1542 spin_unlock(&tmpmle->spinlock); in dlm_master_request_handler()
1545 spin_unlock(&res->spinlock); in dlm_master_request_handler()
1567 spin_unlock(&dlm->spinlock); in dlm_master_request_handler()
1585 spin_lock(&tmpmle->spinlock); in dlm_master_request_handler()
1600 spin_unlock(&tmpmle->spinlock); in dlm_master_request_handler()
1603 spin_unlock(&dlm->spinlock); in dlm_master_request_handler()
1619 spin_lock(&res->spinlock); in dlm_master_request_handler()
1625 spin_unlock(&res->spinlock); in dlm_master_request_handler()
1630 spin_unlock(&res->spinlock); in dlm_master_request_handler()
1666 spin_lock(&res->spinlock); in dlm_do_assert_master()
1668 spin_unlock(&res->spinlock); in dlm_do_assert_master()
1706 spin_lock(&dlm->spinlock); in dlm_do_assert_master()
1714 spin_unlock(&dlm->spinlock); in dlm_do_assert_master()
1735 spin_lock(&res->spinlock); in dlm_do_assert_master()
1737 spin_unlock(&res->spinlock); in dlm_do_assert_master()
1744 spin_lock(&res->spinlock); in dlm_do_assert_master()
1746 spin_unlock(&res->spinlock); in dlm_do_assert_master()
1754 * dlm->spinlock
1755 * res->spinlock
1756 * mle->spinlock
1787 spin_lock(&dlm->spinlock); in dlm_assert_master_handler()
1836 spin_unlock(&dlm->spinlock); in dlm_assert_master_handler()
1847 spin_lock(&res->spinlock); in dlm_assert_master_handler()
1899 spin_unlock(&res->spinlock); in dlm_assert_master_handler()
1909 spin_lock(&mle->spinlock); in dlm_assert_master_handler()
1927 spin_unlock(&mle->spinlock); in dlm_assert_master_handler()
1931 spin_lock(&res->spinlock); in dlm_assert_master_handler()
1944 spin_unlock(&res->spinlock); in dlm_assert_master_handler()
1992 spin_unlock(&dlm->spinlock); in dlm_assert_master_handler()
1997 spin_lock(&res->spinlock); in dlm_assert_master_handler()
1999 spin_unlock(&res->spinlock); in dlm_assert_master_handler()
2026 spin_unlock(&res->spinlock); in dlm_assert_master_handler()
2031 spin_unlock(&dlm->spinlock); in dlm_assert_master_handler()
2042 spin_lock(&res->spinlock); in dlm_assert_master_post_handler()
2044 spin_unlock(&res->spinlock); in dlm_assert_master_post_handler()
2098 spin_lock(&dlm->spinlock); in dlm_assert_master_worker()
2100 spin_unlock(&dlm->spinlock); in dlm_assert_master_worker()
2124 spin_lock(&res->spinlock); in dlm_assert_master_worker()
2129 spin_unlock(&res->spinlock); in dlm_assert_master_worker()
2133 spin_unlock(&res->spinlock); in dlm_assert_master_worker()
2175 spin_lock(&dlm->spinlock); in dlm_pre_master_reco_lockres()
2177 spin_unlock(&dlm->spinlock); in dlm_pre_master_reco_lockres()
2195 spin_lock(&dlm->spinlock); in dlm_pre_master_reco_lockres()
2204 spin_unlock(&dlm->spinlock); in dlm_pre_master_reco_lockres()
2284 spin_lock(&dlm->spinlock); in dlm_deref_lockres_handler()
2287 spin_unlock(&dlm->spinlock); in dlm_deref_lockres_handler()
2292 spin_unlock(&dlm->spinlock); in dlm_deref_lockres_handler()
2294 spin_lock(&res->spinlock); in dlm_deref_lockres_handler()
2304 spin_unlock(&res->spinlock); in dlm_deref_lockres_handler()
2376 spin_lock(&dlm->spinlock); in dlm_deref_lockres_done_handler()
2379 spin_unlock(&dlm->spinlock); in dlm_deref_lockres_done_handler()
2385 spin_lock(&res->spinlock); in dlm_deref_lockres_done_handler()
2387 spin_unlock(&res->spinlock); in dlm_deref_lockres_done_handler()
2388 spin_unlock(&dlm->spinlock); in dlm_deref_lockres_done_handler()
2397 spin_unlock(&res->spinlock); in dlm_deref_lockres_done_handler()
2400 spin_unlock(&dlm->spinlock); in dlm_deref_lockres_done_handler()
2452 spin_lock(&res->spinlock); in dlm_deref_lockres_worker()
2459 spin_unlock(&res->spinlock); in dlm_deref_lockres_worker()
2493 assert_spin_locked(&res->spinlock); in dlm_is_lockres_migratable()
2582 spin_lock(&dlm->spinlock); in dlm_migrate_lockres()
2594 spin_unlock(&dlm->spinlock); in dlm_migrate_lockres()
2610 spin_lock(&res->spinlock); in dlm_migrate_lockres()
2613 spin_unlock(&res->spinlock); in dlm_migrate_lockres()
2660 spin_lock(&res->spinlock); in dlm_migrate_lockres()
2663 spin_unlock(&res->spinlock); in dlm_migrate_lockres()
2706 spin_lock(&res->spinlock); in dlm_migrate_lockres()
2709 spin_unlock(&res->spinlock); in dlm_migrate_lockres()
2718 spin_lock(&res->spinlock); in dlm_migrate_lockres()
2722 spin_unlock(&res->spinlock); in dlm_migrate_lockres()
2757 * Called with the dlm spinlock held, may drop it to do migration, but
2760 * Returns: 1 if dlm->spinlock was dropped/retaken, 0 if never dropped
2763 __must_hold(&dlm->spinlock) in dlm_empty_lockres()
2769 assert_spin_locked(&dlm->spinlock); in dlm_empty_lockres()
2771 spin_lock(&res->spinlock); in dlm_empty_lockres()
2774 spin_unlock(&res->spinlock); in dlm_empty_lockres()
2779 /* Wheee! Migrate lockres here! Will sleep so drop spinlock. */ in dlm_empty_lockres()
2780 spin_unlock(&dlm->spinlock); in dlm_empty_lockres()
2787 spin_lock(&dlm->spinlock); in dlm_empty_lockres()
2796 spin_lock(&lock->spinlock); in dlm_lock_basts_flushed()
2798 spin_unlock(&lock->spinlock); in dlm_lock_basts_flushed()
2808 spin_lock(&res->spinlock); in dlm_migration_can_proceed()
2810 spin_unlock(&res->spinlock); in dlm_migration_can_proceed()
2814 spin_lock(&dlm->spinlock); in dlm_migration_can_proceed()
2817 spin_unlock(&dlm->spinlock); in dlm_migration_can_proceed()
2825 spin_lock(&res->spinlock); in dlm_lockres_is_dirty()
2827 spin_unlock(&res->spinlock); in dlm_lockres_is_dirty()
2843 spin_lock(&res->spinlock); in dlm_mark_lockres_migrating()
2849 spin_unlock(&res->spinlock); in dlm_mark_lockres_migrating()
2855 spin_lock(&res->spinlock); in dlm_mark_lockres_migrating()
2858 spin_unlock(&res->spinlock); in dlm_mark_lockres_migrating()
2888 spin_lock(&dlm->spinlock); in dlm_mark_lockres_migrating()
2894 spin_unlock(&dlm->spinlock); in dlm_mark_lockres_migrating()
2901 spin_lock(&res->spinlock); in dlm_mark_lockres_migrating()
2908 spin_unlock(&res->spinlock); in dlm_mark_lockres_migrating()
2931 assert_spin_locked(&res->spinlock); in dlm_remove_nonlocal_locks()
2987 assert_spin_locked(&dlm->spinlock); in dlm_pick_migration_target()
2988 assert_spin_locked(&res->spinlock); in dlm_pick_migration_target()
3048 spin_lock(&dlm->spinlock); in dlm_do_migrate_request()
3050 spin_unlock(&dlm->spinlock); in dlm_do_migrate_request()
3080 spin_lock(&res->spinlock); in dlm_do_migrate_request()
3082 spin_unlock(&res->spinlock); in dlm_do_migrate_request()
3128 spin_lock(&dlm->spinlock); in dlm_migrate_request_handler()
3131 spin_lock(&res->spinlock); in dlm_migrate_request_handler()
3136 spin_unlock(&res->spinlock); in dlm_migrate_request_handler()
3144 spin_unlock(&res->spinlock); in dlm_migrate_request_handler()
3159 spin_unlock(&dlm->spinlock); in dlm_migrate_request_handler()
3174 /* must be holding dlm->spinlock and dlm->master_lock
3193 assert_spin_locked(&dlm->spinlock); in dlm_add_migration_mle()
3200 spin_lock(&tmp->spinlock); in dlm_add_migration_mle()
3207 spin_unlock(&tmp->spinlock); in dlm_add_migration_mle()
3238 spin_unlock(&tmp->spinlock); in dlm_add_migration_mle()
3269 spin_lock(&res->spinlock); in dlm_reset_mleres_owner()
3272 spin_unlock(&res->spinlock); in dlm_reset_mleres_owner()
3292 spin_lock(&mle->spinlock); in dlm_clean_migration_mle()
3295 spin_unlock(&mle->spinlock); in dlm_clean_migration_mle()
3307 spin_lock(&mle->spinlock); in dlm_clean_block_mle()
3312 spin_unlock(&mle->spinlock); in dlm_clean_block_mle()
3320 spin_unlock(&mle->spinlock); in dlm_clean_block_mle()
3339 assert_spin_locked(&dlm->spinlock); in dlm_clean_master_list()
3419 spin_lock(&dlm->spinlock); in dlm_finish_migration()
3423 spin_unlock(&dlm->spinlock); in dlm_finish_migration()
3428 spin_lock(&res->spinlock); in dlm_finish_migration()
3430 spin_unlock(&res->spinlock); in dlm_finish_migration()
3467 spin_lock(&res->spinlock); in dlm_finish_migration()
3470 spin_unlock(&res->spinlock); in dlm_finish_migration()
3486 * spinlock after the call. */
3489 assert_spin_locked(&res->spinlock); in __dlm_lockres_reserve_ast()
3514 if (!atomic_dec_and_lock(&res->asts_reserved, &res->spinlock)) in dlm_lockres_release_ast()
3518 spin_unlock(&res->spinlock); in dlm_lockres_release_ast()
3525 spin_unlock(&res->spinlock); in dlm_lockres_release_ast()
3543 spin_lock(&dlm->spinlock); in dlm_force_free_mles()
3565 spin_unlock(&dlm->spinlock); in dlm_force_free_mles()