Whamcloud - gitweb
LU-10467 lustre: don't use l_wait_event() for simple sleep.
[fs/lustre-release.git] / lustre / fid / fid_request.c
index a8ca087..9629f4e 100644 (file)
@@ -40,6 +40,7 @@
 
 #include <linux/err.h>
 #include <linux/module.h>
+#include <linux/delay.h>
 #include <obd.h>
 #include <obd_class.h>
 #include <obd_support.h>
@@ -196,17 +197,11 @@ static int seq_client_alloc_meta(const struct lu_env *env,
                         * (MDT0)yet */
                        rc = seq_client_rpc(seq, &seq->lcs_space,
                                            SEQ_ALLOC_META, "meta");
-                       if (rc == -EINPROGRESS || rc == -EAGAIN) {
-                               wait_queue_head_t waitq;
-                               struct l_wait_info  lwi;
-
+                       if (rc == -EINPROGRESS || rc == -EAGAIN)
                                /* MDT0 is not ready, let's wait for 2
                                 * seconds and retry. */
-                               init_waitqueue_head(&waitq);
-                               lwi = LWI_TIMEOUT(cfs_time_seconds(2), NULL,
-                                                 NULL);
-                               l_wait_event(waitq, 0, &lwi);
-                       }
+                               ssleep(2);
+
                } while (rc == -EINPROGRESS || rc == -EAGAIN);
        }