X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Fmdc%2Fmdc_request.c;h=82d1b5e55cde5319733f06de2606f7cc77a22abe;hb=1e992e94eaf8ac9db2f6a7405cb9b8daf72ed742;hp=f07a0dc967013ad6c0596399684c1ce6a679cb35;hpb=350cd07b27f94e02203274913d89b659bda06f86;p=fs%2Flustre-release.git diff --git a/lustre/mdc/mdc_request.c b/lustre/mdc/mdc_request.c index f07a0dc..82d1b5e 100644 --- a/lustre/mdc/mdc_request.c +++ b/lustre/mdc/mdc_request.c @@ -2995,10 +2995,12 @@ static int __init mdc_init(void) rc = class_register_type(&mdc_obd_ops, &mdc_md_ops, true, NULL, LUSTRE_MDC_NAME, &mdc_device_type); if (rc) - goto out_dev; + goto out_class; return 0; +out_class: + class_destroy(mdc_changelog_class); out_dev: unregister_chrdev_region(mdc_changelog_dev, MDC_CHANGELOG_DEV_COUNT); return rc; @@ -3006,9 +3008,10 @@ out_dev: static void __exit mdc_exit(void) { + class_unregister_type(LUSTRE_MDC_NAME); class_destroy(mdc_changelog_class); unregister_chrdev_region(mdc_changelog_dev, MDC_CHANGELOG_DEV_COUNT); - class_unregister_type(LUSTRE_MDC_NAME); + idr_destroy(&mdc_changelog_minor_idr); } MODULE_AUTHOR("OpenSFS, Inc. ");