Whamcloud - gitweb
LU-8637 obdclass: LWP callback hold export reference
[fs/lustre-release.git] / lustre / osp / lwp_dev.c
index b28f32c..8f33435 100644 (file)
@@ -403,6 +403,8 @@ static int lwp_notify_main(void *args)
        struct ptlrpc_thread    *thread;
 
        LASSERT(exp != NULL);
+       class_export_get(exp);
+
        lwp = lu2lwp_dev(exp->exp_obd->obd_lu_dev);
        thread = &lwp->lpd_notify_thread;
 
@@ -411,6 +413,7 @@ static int lwp_notify_main(void *args)
 
        lustre_notify_lwp_list(exp);
 
+       class_export_put(exp);
        thread_set_flags(thread, SVC_STOPPED);
        wake_up(&thread->t_ctl_waitq);
        return 0;