X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fobdclass%2Fllog.c;h=0fdd8feb346cda7632d0f0c48fd7b817c7e08a64;hp=56e941ea0fecbecfd77ad722a81491e35f8035c4;hb=f623f68ae3cbfc6e2d4951aefb3047f72e669564;hpb=85cbe1a3ee6940f7468884bca43cd736a5365694 diff --git a/lustre/obdclass/llog.c b/lustre/obdclass/llog.c index 56e941e..0fdd8fe 100644 --- a/lustre/obdclass/llog.c +++ b/lustre/obdclass/llog.c @@ -258,7 +258,10 @@ int llog_cancel_rec(const struct lu_env *env, struct llog_handle *loghandle, if ((llh->llh_flags & LLOG_F_ZAP_WHEN_EMPTY) && (llh->llh_count == 1) && - (loghandle->lgh_last_idx == LLOG_HDR_BITMAP_SIZE(llh) - 1)) { + ((loghandle->lgh_last_idx == LLOG_HDR_BITMAP_SIZE(llh) - 1) || + (loghandle->u.phd.phd_cat_handle != NULL && + loghandle->u.phd.phd_cat_handle->u.chd.chd_current_log != + loghandle))) { rc = llog_trans_destroy(env, loghandle, th); if (rc < 0) { /* Sigh, can not destroy the final plain llog, but