From 1db258b57e5669e07934fe848861817f88102475 Mon Sep 17 00:00:00 2001 From: Alexey Lyashkov Date: Sat, 15 Sep 2018 10:33:51 +0300 Subject: [PATCH] LU-11169 obdclass: fix old return code usage Commit 49d8a7ccd73 from LU-9855 introduce a fail in the obd_commitrw function which parent error code replaced with result of exp_check_ops function. Cray-bugid: LUS-6195 Test-Parameters: trivial Change-Id: If8643ba39232f94ba9c523fdb9f10c1411a1838a Signed-off-by: Alexey Lyashkov Reviewed-on: https://review.whamcloud.com/32906 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: James Simmons Reviewed-by: Ben Evans Reviewed-by: Oleg Drokin --- lustre/include/obd_class.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lustre/include/obd_class.h b/lustre/include/obd_class.h index 293924e..3c9af4c 100644 --- a/lustre/include/obd_class.h +++ b/lustre/include/obd_class.h @@ -1112,8 +1112,9 @@ static inline int obd_commitrw(const struct lu_env *env, int cmd, struct obd_export *exp, struct obdo *oa, int objcount, struct obd_ioobj *obj, struct niobuf_remote *rnb, int pages, - struct niobuf_local *local, int rc) + struct niobuf_local *local, const int orig_rc) { + int rc; ENTRY; rc = exp_check_ops(exp); @@ -1127,7 +1128,7 @@ static inline int obd_commitrw(const struct lu_env *env, int cmd, } rc = OBP(exp->exp_obd, commitrw)(env, cmd, exp, oa, objcount, obj, - rnb, pages, local, rc); + rnb, pages, local, orig_rc); RETURN(rc); } -- 1.8.3.1