diff options
Diffstat (limited to 'fs/gfs2/locking/dlm/main.c')
-rw-r--r-- | fs/gfs2/locking/dlm/main.c | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/fs/gfs2/locking/dlm/main.c b/fs/gfs2/locking/dlm/main.c new file mode 100644 index 000000000000..3ced92ef1b19 --- /dev/null +++ b/fs/gfs2/locking/dlm/main.c | |||
@@ -0,0 +1,58 @@ | |||
1 | /****************************************************************************** | ||
2 | ******************************************************************************* | ||
3 | ** | ||
4 | ** Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved. | ||
5 | ** Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved. | ||
6 | ** | ||
7 | ** This copyrighted material is made available to anyone wishing to use, | ||
8 | ** modify, copy, or redistribute it subject to the terms and conditions | ||
9 | ** of the GNU General Public License v.2. | ||
10 | ** | ||
11 | ******************************************************************************* | ||
12 | ******************************************************************************/ | ||
13 | |||
14 | #include <linux/init.h> | ||
15 | |||
16 | #include "lock_dlm.h" | ||
17 | |||
18 | extern int gdlm_drop_count; | ||
19 | extern int gdlm_drop_period; | ||
20 | |||
21 | extern struct lm_lockops gdlm_ops; | ||
22 | |||
23 | int __init init_lock_dlm(void) | ||
24 | { | ||
25 | int error; | ||
26 | |||
27 | error = lm_register_proto(&gdlm_ops); | ||
28 | if (error) { | ||
29 | printk("lock_dlm: can't register protocol: %d\n", error); | ||
30 | return error; | ||
31 | } | ||
32 | |||
33 | error = gdlm_sysfs_init(); | ||
34 | if (error) { | ||
35 | lm_unregister_proto(&gdlm_ops); | ||
36 | return error; | ||
37 | } | ||
38 | |||
39 | gdlm_drop_count = GDLM_DROP_COUNT; | ||
40 | gdlm_drop_period = GDLM_DROP_PERIOD; | ||
41 | |||
42 | printk("Lock_DLM (built %s %s) installed\n", __DATE__, __TIME__); | ||
43 | return 0; | ||
44 | } | ||
45 | |||
46 | void __exit exit_lock_dlm(void) | ||
47 | { | ||
48 | lm_unregister_proto(&gdlm_ops); | ||
49 | gdlm_sysfs_exit(); | ||
50 | } | ||
51 | |||
52 | module_init(init_lock_dlm); | ||
53 | module_exit(exit_lock_dlm); | ||
54 | |||
55 | MODULE_DESCRIPTION("GFS DLM Locking Module"); | ||
56 | MODULE_AUTHOR("Red Hat, Inc."); | ||
57 | MODULE_LICENSE("GPL"); | ||
58 | |||