Whamcloud - gitweb
LU-7064 obd: detect errors from llog_declare_destroy() 99/17999/8
authorParinay Kondekar <parinay.kondekar@seagate.com>
Thu, 14 Jan 2016 13:55:29 +0000 (19:25 +0530)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 2 Jun 2016 04:42:01 +0000 (04:42 +0000)
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 <parinay.kondekar@seagate.com>
Reviewed-on: http://review.whamcloud.com/17999
Tested-by: Jenkins
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/obdclass/llog.c

index 174347c..0ab7a34 100644 (file)
@@ -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);