From: Parinay Kondekar Date: Thu, 14 Jan 2016 13:55:29 +0000 (+0530) Subject: LU-7064 obd: detect errors from llog_declare_destroy() X-Git-Tag: 2.8.54~12 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=5d9275e2784942266f2c9cd03f9ad2f17fba0af4;hp=5522990660248930108e84c89bc7e5807bda9ea0 LU-7064 obd: detect errors from llog_declare_destroy() The return value from llog_declare_destroy() in llog_cancel_rec() is not used. This patch adds the same check. Change-Id: I31c09d426e9e4ae5418531acd73a6428927e9bd3 Signed-off-by: Parinay Kondekar Reviewed-on: http://review.whamcloud.com/17999 Tested-by: Jenkins Reviewed-by: John L. Hammond Reviewed-by: Dmitry Eremin Tested-by: Maloo Reviewed-by: Oleg Drokin --- diff --git a/lustre/obdclass/llog.c b/lustre/obdclass/llog.c index 174347c..0ab7a34 100644 --- a/lustre/obdclass/llog.c +++ b/lustre/obdclass/llog.c @@ -229,8 +229,11 @@ int llog_cancel_rec(const struct lu_env *env, struct llog_handle *loghandle, if (rc < 0) GOTO(out_trans, rc); - if ((llh->llh_flags & LLOG_F_ZAP_WHEN_EMPTY)) + if ((llh->llh_flags & LLOG_F_ZAP_WHEN_EMPTY)) { rc = llog_declare_destroy(env, loghandle, th); + if (rc < 0) + GOTO(out_trans, rc); + } th->th_wait_submit = 1; rc = dt_trans_start_local(env, dt, th);