return rc;
}
-int lproc_mgs_cleanup(struct mgs_device *mgs)
+void lproc_mgs_cleanup(struct mgs_device *mgs)
{
struct obd_device *obd = mgs->mgs_obd;
- if (!obd)
- return -EINVAL;
+ if (obd == NULL)
+ return;
if (mgs->mgs_proc_osd != NULL)
lprocfs_remove(&mgs->mgs_proc_osd);
mgs->mgs_proc_live = NULL;
}
lprocfs_free_per_client_stats(obd);
+ lprocfs_obd_cleanup(obd);
lprocfs_free_obd_stats(obd);
lprocfs_free_md_stats(obd);
-
- return lprocfs_obd_cleanup(obd);
}
static int mgs_live_seq_show(struct seq_file *seq, void *v)
if (!mgs->mgs_proc_live)
return 0;
- lprocfs_remove_proc_entry(fsdb->fsdb_name, mgs->mgs_proc_live);
+ /* didn't create the proc file for MGSSELF_NAME */
+ if (!test_bit(FSDB_MGS_SELF, &fsdb->fsdb_flags))
+ lprocfs_remove_proc_entry(fsdb->fsdb_name, mgs->mgs_proc_live);
return 0;
}