aboutsummaryrefslogtreecommitdiffstats
path: root/fs/dlm/recoverd.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/dlm/recoverd.c')
-rw-r--r--fs/dlm/recoverd.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/dlm/recoverd.c b/fs/dlm/recoverd.c
index 4a1d6023fd9b..6e4ee94ce7df 100644
--- a/fs/dlm/recoverd.c
+++ b/fs/dlm/recoverd.c
@@ -219,6 +219,10 @@ static int ls_recover(struct dlm_ls *ls, struct dlm_recover *rv)
219 return error; 219 return error;
220} 220}
221 221
222/* The dlm_ls_start() that created the rv we take here may already have been
223 stopped via dlm_ls_stop(); in that case we need to leave the RECOVERY_STOP
224 flag set. */
225
222static void do_ls_recovery(struct dlm_ls *ls) 226static void do_ls_recovery(struct dlm_ls *ls)
223{ 227{
224 struct dlm_recover *rv = NULL; 228 struct dlm_recover *rv = NULL;
@@ -226,7 +230,8 @@ static void do_ls_recovery(struct dlm_ls *ls)
226 spin_lock(&ls->ls_recover_lock); 230 spin_lock(&ls->ls_recover_lock);
227 rv = ls->ls_recover_args; 231 rv = ls->ls_recover_args;
228 ls->ls_recover_args = NULL; 232 ls->ls_recover_args = NULL;
229 clear_bit(LSFL_RECOVERY_STOP, &ls->ls_flags); 233 if (rv && ls->ls_recover_seq == rv->seq)
234 clear_bit(LSFL_RECOVERY_STOP, &ls->ls_flags);
230 spin_unlock(&ls->ls_recover_lock); 235 spin_unlock(&ls->ls_recover_lock);
231 236
232 if (rv) { 237 if (rv) {