Whamcloud - gitweb
LU-10467 lustre: convert users of back_to_sleep()
[fs/lustre-release.git] / lustre / osp / osp_precreate.c
index 6e55a23..23b7713 100644 (file)
@@ -1200,8 +1200,6 @@ static int osp_precreate_thread(void *_arg)
 {
        struct osp_device       *d = _arg;
        struct ptlrpc_thread    *thread = &d->opd_pre_thread;
 {
        struct osp_device       *d = _arg;
        struct ptlrpc_thread    *thread = &d->opd_pre_thread;
-       struct l_wait_info       lwi2 = LWI_TIMEOUT(cfs_time_seconds(5),
-                                                   back_to_sleep, NULL);
        struct lu_env            env;
        int                      rc;
 
        struct lu_env            env;
        int                      rc;
 
@@ -1267,8 +1265,12 @@ static int osp_precreate_thread(void *_arg)
                }
 
                if (osp_statfs_update(&env, d)) {
                }
 
                if (osp_statfs_update(&env, d)) {
-                       l_wait_event(d->opd_pre_waitq,
-                                    !osp_precreate_running(d), &lwi2);
+                       if (wait_event_idle_timeout(d->opd_pre_waitq,
+                                                   !osp_precreate_running(d),
+                                                   cfs_time_seconds(5)) == 0)
+                               l_wait_event_abortable(
+                                       d->opd_pre_waitq,
+                                       !osp_precreate_running(d));
                        continue;
                }
 
                        continue;
                }