Make sure the osp_precreate_reserve() always return proper error
when reserving object failed.
Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: I9d16135091ebe5ef1243416a15722c4859026e46
Reviewed-on: http://review.whamcloud.com/5683
Tested-by: Hudson
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
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);