Commit 3e973671 authored by Alexander Aring's avatar Alexander Aring Committed by David Teigland
Browse files

fs: dlm: use dlm_recovery_stopped instead of test_bit



This patch will change to use dlm_recovery_stopped() which is the dlm way
to check if the LSFL_RECOVER_STOP flag in ls_flags by using the helper.
It is an atomic operation but the check is still as before to fetch the
value if ls_recover_lock is held. There might be more further
investigations if the value can be changed afterwards and if it has any
side effects.

Signed-off-by: default avatarAlexander Aring <aahringo@redhat.com>
Signed-off-by: default avatarDavid Teigland <teigland@redhat.com>
parent 658bd576
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -601,7 +601,7 @@ void dlm_receive_rcom(struct dlm_ls *ls, struct dlm_rcom *rc, int nodeid)

	spin_lock(&ls->ls_recover_lock);
	status = ls->ls_recover_status;
	stop = test_bit(LSFL_RECOVER_STOP, &ls->ls_flags);
	stop = dlm_recovery_stopped(ls);
	seq = ls->ls_recover_seq;
	spin_unlock(&ls->ls_recover_lock);