{
struct llog_handle *llh;
struct lvfs_run_ctxt saved;
+ struct llog_ctxt *ctxt;
struct mgs_msl_data *mmd;
int rc, rc2;
ENTRY;
push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
- rc = llog_create(llog_get_context(obd, LLOG_CONFIG_ORIG_CTXT),
- &llh, NULL, logname);
+ ctxt = llog_get_context(obd, LLOG_CONFIG_ORIG_CTXT);
+ LASSERT(ctxt != NULL);
+ rc = llog_create(ctxt, &llh, NULL, logname);
if (rc)
GOTO(out_pop, rc);
out_pop:
pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
+ llog_ctxt_put(ctxt);
+
if (rc)
CERROR("modify sptlrpc log %s failed %d\n", logname, rc);
-
RETURN(rc);
}
{
struct llog_handle *llh = NULL;
struct lvfs_run_ctxt saved;
+ struct llog_ctxt *ctxt;
char *logname;
struct mgs_srpc_read_data msrd;
int rc;
ENTRY;
+ ctxt = llog_get_context(obd, LLOG_CONFIG_ORIG_CTXT);
+ LASSERT(ctxt != NULL);
+
/* construct log name */
rc = name_create(&logname, fsdb->fsdb_name, "-sptlrpc");
if (rc)
push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
- rc = llog_create(llog_get_context(obd, LLOG_CONFIG_ORIG_CTXT),
- &llh, NULL, logname);
+ rc = llog_create(ctxt, &llh, NULL, logname);
if (rc)
GOTO(out_pop, rc);
pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
out:
name_destroy(&logname);
+ llog_ctxt_put(ctxt);
if (rc)
CERROR("failed to read sptlrpc config database: %d\n", rc);