1 // SPDX-License-Identifier: GPL-2.0-only
2 /******************************************************************************
3 *******************************************************************************
5 ** Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved.
6 ** Copyright (C) 2004-2007 Red Hat, Inc. All rights reserved.
9 *******************************************************************************
10 ******************************************************************************/
12 #include <linux/module.h>
14 #include "dlm_internal.h"
15 #include "lockspace.h"
22 #define CREATE_TRACE_POINTS
23 #include <trace/events/dlm.h>
25 struct workqueue_struct
*dlm_wq
;
27 static int __init
init_dlm(void)
31 error
= dlm_memory_init();
37 error
= dlm_lockspace_init();
41 error
= dlm_config_init();
45 dlm_register_debugfs();
47 error
= dlm_user_init();
51 error
= dlm_plock_init();
55 dlm_wq
= alloc_workqueue("dlm_wq", 0, 0);
61 printk("DLM installed\n");
70 dlm_unregister_debugfs();
81 static void __exit
exit_dlm(void)
83 /* be sure every pending work e.g. freeing is done */
84 destroy_workqueue(dlm_wq
);
90 dlm_unregister_debugfs();
94 module_init(init_dlm
);
95 module_exit(exit_dlm
);
97 MODULE_DESCRIPTION("Distributed Lock Manager");
98 MODULE_AUTHOR("Red Hat, Inc.");
99 MODULE_LICENSE("GPL");
101 EXPORT_SYMBOL_GPL(dlm_new_lockspace
);
102 EXPORT_SYMBOL_GPL(dlm_release_lockspace
);
103 EXPORT_SYMBOL_GPL(dlm_lock
);
104 EXPORT_SYMBOL_GPL(dlm_unlock
);