#include <linux/obd_class.h>
#include <linux/lustre_log.h>
+#include <linux/lustre_mds.h>
#include <portals/list.h>
/* helper functions for calling the llog obd methods */
int rc = 0;
ENTRY;
- LASSERT(ctxt);
+ if (ctxt == NULL)
+ RETURN(0);
if (CTXTP(ctxt, cleanup))
rc = CTXTP(ctxt, cleanup)(ctxt);
LASSERT(ctxt);
llog_gen_init(ctxt);
- if (logid->lgl_oid)
- rc = llog_create(ctxt, &handle, logid, NULL);
- else {
- rc = llog_create(ctxt, &handle, NULL, NULL);
+ if (logid->lgl_oid) {
+ rc = llog_open(ctxt, &handle, logid, NULL, 0);
+ } else {
+ rc = llog_open(ctxt, &handle, NULL, NULL, 0);
if (!rc)
*logid = handle->lgh_id;
}