if (mds->mds_profile) {
struct lustre_profile *lprof;
/* The profile defines which osc and mdc to connect to, for a
if (mds->mds_profile) {
struct lustre_profile *lprof;
/* The profile defines which osc and mdc to connect to, for a
/* Notify the LOV, which will in turn call mds_notify for each tgt */
/* This means that we have to hack obd_notify to think we're obd_set_up
during mds_lov_connect. */
/* Notify the LOV, which will in turn call mds_notify for each tgt */
/* This means that we have to hack obd_notify to think we're obd_set_up
during mds_lov_connect. */
- llog_cleanup(llog_get_context(obd, LLOG_CONFIG_ORIG_CTXT));
- llog_cleanup(llog_get_context(obd, LLOG_LOVEA_ORIG_CTXT));
+ ctxt = llog_get_context(obd, LLOG_CONFIG_ORIG_CTXT);
+ if (ctxt)
+ llog_cleanup(ctxt);
+ ctxt = llog_get_context(obd, LLOG_LOVEA_ORIG_CTXT);
+ if (ctxt)
+ llog_cleanup(ctxt);
/* why not mnt->mnt_sb instead of mnt->mnt_root->d_inode->i_sb? */
obd->u.obt.obt_sb = mnt->mnt_root->d_inode->i_sb;
/* why not mnt->mnt_sb instead of mnt->mnt_root->d_inode->i_sb? */
obd->u.obt.obt_sb = mnt->mnt_root->d_inode->i_sb;
fsfilt_setup(obd, obd->u.obt.obt_sb);
OBD_SET_CTXT_MAGIC(&obd->obd_lvfs_ctxt);
fsfilt_setup(obd, obd->u.obt.obt_sb);
OBD_SET_CTXT_MAGIC(&obd->obd_lvfs_ctxt);
* we need only lmi here but not get mount
* OSD did mount already, so put mount back
*/
* we need only lmi here but not get mount
* OSD did mount already, so put mount back
*/
fsfilt_put_ops(obd->obd_fsops);
pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
fsfilt_put_ops(obd->obd_fsops);
pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
mds_quota_interface_ref = PORTAL_SYMBOL_GET(mds_quota_interface);
rc = lquota_init(mds_quota_interface_ref);
if (rc) {
mds_quota_interface_ref = PORTAL_SYMBOL_GET(mds_quota_interface);
rc = lquota_init(mds_quota_interface_ref);
if (rc) {