#include <linux/err.h>
#include <linux/module.h>
+#include <linux/delay.h>
#include <obd.h>
#include <obd_class.h>
#include <obd_support.h>
* (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);
}