X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fosp%2Fosp_precreate.c;h=9b3febcedfe620645e1738a36fdb67c981200272;hp=405524cb7c292f92b4a997cc65baac147dec3ed1;hb=689a3a288ee6b06d13541c4b6cd99ea146c5ad22;hpb=2adc20013d9c2a5969a3154b0ca93ac007b1a4e2 diff --git a/lustre/osp/osp_precreate.c b/lustre/osp/osp_precreate.c index 405524cb..9b3febc 100644 --- a/lustre/osp/osp_precreate.c +++ b/lustre/osp/osp_precreate.c @@ -912,9 +912,6 @@ static int osp_precreate_thread(void *_arg) d->opd_new_connection, &lwi); - if (!osp_precreate_running(d)) - break; - if (!d->opd_new_connection) continue; @@ -923,6 +920,10 @@ static int osp_precreate_thread(void *_arg) break; } + if (!osp_precreate_running(d)) + break; + + LASSERT(d->opd_obd->u.cli.cl_seq != NULL); if (d->opd_obd->u.cli.cl_seq->lcs_exp == NULL) { /* Get new sequence for client first */ LASSERT(d->opd_exp != NULL); @@ -1138,8 +1139,10 @@ int osp_precreate_reserve(const struct lu_env *env, struct osp_device *d) lwi = LWI_TIMEOUT(expire - cfs_time_current(), osp_precreate_timeout_condition, d); - if (cfs_time_aftereq(cfs_time_current(), expire)) + if (cfs_time_aftereq(cfs_time_current(), expire)) { + rc = -ETIMEDOUT; break; + } l_wait_event(d->opd_pre_user_waitq, osp_precreate_ready_condition(env, d), &lwi);