Whamcloud - gitweb
LU-12930 various: use schedule_timeout_*interruptible
[fs/lustre-release.git] / lustre / ldlm / ldlm_resource.c
index 5b2ce0c..490e7c5 100644 (file)
@@ -1056,11 +1056,10 @@ static void cleanup_resource(struct ldlm_resource *res, struct list_head *q,
                         */
                        unlock_res(res);
                        LDLM_DEBUG(lock, "setting FL_LOCAL_ONLY");
-                       if (lock->l_flags & LDLM_FL_FAIL_LOC) {
-                               set_current_state(TASK_UNINTERRUPTIBLE);
-                               schedule_timeout(cfs_time_seconds(4));
-                               set_current_state(TASK_RUNNING);
-                       }
+                       if (lock->l_flags & LDLM_FL_FAIL_LOC)
+                               schedule_timeout_uninterruptible(
+                                       cfs_time_seconds(4));
+
                        if (lock->l_completion_ast)
                                lock->l_completion_ast(lock,
                                                       LDLM_FL_FAILED, NULL);