Whamcloud - gitweb
LU-1866 misc: fix some issues found during LFSCK
[fs/lustre-release.git] / lustre / osp / osp_dev.c
index aaf5073..9a66737 100644 (file)
@@ -380,6 +380,9 @@ static int osp_process_config(const struct lu_env *env,
        ENTRY;
 
        switch (lcfg->lcfg_command) {
+       case LCFG_PRE_CLEANUP:
+               rc = osp_disconnect(d);
+               break;
        case LCFG_CLEANUP:
                lu_dev_del_linkage(dev->ld_site, dev);
                rc = osp_shutdown(env, d);
@@ -730,7 +733,7 @@ out_last_used:
 out_proc:
        ptlrpc_lprocfs_unregister_obd(obd);
        lprocfs_obd_cleanup(obd);
-       class_destroy_import(obd->u.cli.cl_import);
+       obd_cleanup_client_import(obd);
        client_obd_cleanup(obd);
 out_ref:
        ptlrpcd_decref();