Whamcloud - gitweb
LU-7064 obd: detect errors from llog_declare_destroy()
[fs/lustre-release.git] / 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 (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);
                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);
 
        th->th_wait_submit = 1;
        rc = dt_trans_start_local(env, dt, th);