#include <linux/version.h>
#include <linux/mm.h>
#include <linux/user_namespace.h>
+#include <linux/delay.h>
#ifdef HAVE_UIDGID_HEADER
# include <linux/uidgid.h>
#endif
struct ll_sb_info *sbi = ll_s2sbi(sb);
struct obd_device *obd;
struct obd_ioctl_data *ioc_data;
- struct l_wait_info lwi;
- wait_queue_head_t waitq;
+ int cnt;
ENTRY;
CDEBUG(D_VFSTRACE, "VFS Op: superblock %p count %d active %d\n", sb,
* and then continue. For now, we just periodically checking for vfs
* to decrement mnt_cnt and hope to finish it within 10sec.
*/
- init_waitqueue_head(&waitq);
- lwi = LWI_TIMEOUT_INTERVAL(cfs_time_seconds(10),
- cfs_time_seconds(1), NULL, NULL);
- l_wait_event(waitq, may_umount(sbi->ll_mnt.mnt), &lwi);
+ cnt = 10;
+ while (cnt > 0 &&
+ !may_umount(sbi->ll_mnt.mnt)) {
+ ssleep(1);
+ cnt -= 1;
+ }
EXIT;
}
#define DEBUG_SUBSYSTEM S_LOV
+#include <linux/delay.h>
#include <libcfs/libcfs.h>
#include <obd_class.h>
*/
static int lov_check_and_wait_active(struct lov_obd *lov, int ost_idx)
{
- wait_queue_head_t waitq;
- struct l_wait_info lwi;
struct lov_tgt_desc *tgt;
struct obd_import *imp = NULL;
int rc = 0;
+ int cnt;
mutex_lock(&lov->lov_lock);
mutex_unlock(&lov->lov_lock);
- init_waitqueue_head(&waitq);
- lwi = LWI_TIMEOUT_INTERVAL(cfs_time_seconds(obd_timeout),
- cfs_time_seconds(1), NULL, NULL);
-
- rc = l_wait_event(waitq, lov_check_set(lov, ost_idx), &lwi);
+ cnt = obd_timeout;
+ while (cnt > 0 &&
+ !lov_check_set(lov, ost_idx)) {
+ ssleep(1);
+ cnt -= 1;
+ }
if (tgt->ltd_active)
return 1;