From: Niu Yawei Date: Tue, 12 Mar 2013 09:41:18 +0000 (-0400) Subject: LU-2895 osp: return proper error in osp_precreate_reserve X-Git-Tag: 2.3.64~84 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=689a3a288ee6b06d13541c4b6cd99ea146c5ad22 LU-2895 osp: return proper error in osp_precreate_reserve Make sure the osp_precreate_reserve() always return proper error when reserving object failed. Signed-off-by: Niu Yawei Change-Id: I9d16135091ebe5ef1243416a15722c4859026e46 Reviewed-on: http://review.whamcloud.com/5683 Tested-by: Hudson Reviewed-by: Alex Zhuravlev Tested-by: Maloo Reviewed-by: Mike Pershin Reviewed-by: Oleg Drokin --- diff --git a/lustre/osp/osp_precreate.c b/lustre/osp/osp_precreate.c index 1836f18..9b3febc 100644 --- a/lustre/osp/osp_precreate.c +++ b/lustre/osp/osp_precreate.c @@ -1139,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);