X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fobdclass%2Fllog.c;h=274ba97517d12e9152e3514d981b6952176509a0;hp=78c9e5d2575ebf8d27823dcd402f7cf32576b5f0;hb=bed1cbb3db18e01b933f1a799b4f4fd4ff707cfa;hpb=829731a6e971f4ca12c23e8fcd08fb4516b839dd diff --git a/lustre/obdclass/llog.c b/lustre/obdclass/llog.c index 78c9e5d..274ba97 100644 --- a/lustre/obdclass/llog.c +++ b/lustre/obdclass/llog.c @@ -196,7 +196,7 @@ int llog_cancel_rec(const struct lu_env *env, struct llog_handle *loghandle, { struct llog_thread_info *lgi = llog_info(env); struct dt_device *dt; - struct llog_log_hdr *llh = loghandle->lgh_hdr; + struct llog_log_hdr *llh; struct thandle *th; int rc; int rc1; @@ -204,6 +204,12 @@ int llog_cancel_rec(const struct lu_env *env, struct llog_handle *loghandle, ENTRY; + LASSERT(loghandle != NULL); + LASSERT(loghandle->lgh_ctxt != NULL); + LASSERT(loghandle->lgh_obj != NULL); + + llh = loghandle->lgh_hdr; + CDEBUG(D_RPCTRACE, "Canceling %d in log "DFID"\n", index, PFID(&loghandle->lgh_id.lgl_oi.oi_fid)); @@ -212,10 +218,6 @@ int llog_cancel_rec(const struct lu_env *env, struct llog_handle *loghandle, RETURN(-EINVAL); } - LASSERT(loghandle != NULL); - LASSERT(loghandle->lgh_ctxt != NULL); - LASSERT(loghandle->lgh_obj != NULL); - dt = lu2dt_dev(loghandle->lgh_obj->do_lu.lo_dev); th = dt_trans_create(env, dt);