Whamcloud - gitweb
LU-6684 lfsck: stop lfsck even if some servers offline
[fs/lustre-release.git] / lustre / lfsck / lfsck_engine.c
index d1053c1..d63f893 100644 (file)
@@ -1577,6 +1577,7 @@ int lfsck_assistant_engine(void *args)
        }
 
        spin_lock(&lad->lad_lock);
+       lad->lad_task = current;
        thread_set_flags(athread, SVC_RUNNING);
        spin_unlock(&lad->lad_lock);
        wake_up_all(&mthread->t_ctl_waitq);
@@ -1820,6 +1821,7 @@ fini:
        lad->lad_assistant_status = (rc1 != 0 ? rc1 : rc);
        thread_set_flags(athread, SVC_STOPPED);
        wake_up_all(&mthread->t_ctl_waitq);
+       lad->lad_task = NULL;
        spin_unlock(&lad->lad_lock);
 
        CDEBUG(D_LFSCK, "%s: %s LFSCK assistant thread exit: rc = %d\n",