]> bbs.cooldavid.org Git - net-next-2.6.git/blame - fs/gfs2/locking/dlm/main.c
[GFS2] Update copyright, tidy up incore.h
[net-next-2.6.git] / fs / gfs2 / locking / dlm / main.c
CommitLineData
869d81df
DT
1/*
2 * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved.
3 * Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved.
4 *
5 * This copyrighted material is made available to anyone wishing to use,
6 * modify, copy, or redistribute it subject to the terms and conditions
e9fc2aa0 7 * of the GNU General Public License version 2.
869d81df 8 */
29b7998d
DT
9
10#include <linux/init.h>
11
12#include "lock_dlm.h"
13
14extern int gdlm_drop_count;
15extern int gdlm_drop_period;
16
17extern struct lm_lockops gdlm_ops;
18
08bc2dbc 19static int __init init_lock_dlm(void)
29b7998d
DT
20{
21 int error;
22
3120ec54 23 error = gfs2_register_lockproto(&gdlm_ops);
29b7998d 24 if (error) {
f382894e
SW
25 printk(KERN_WARNING "lock_dlm: can't register protocol: %d\n",
26 error);
29b7998d
DT
27 return error;
28 }
29
30 error = gdlm_sysfs_init();
31 if (error) {
3120ec54 32 gfs2_unregister_lockproto(&gdlm_ops);
869d81df
DT
33 return error;
34 }
35
36 error = gdlm_plock_init();
37 if (error) {
38 gdlm_sysfs_exit();
3120ec54 39 gfs2_unregister_lockproto(&gdlm_ops);
29b7998d
DT
40 return error;
41 }
42
43 gdlm_drop_count = GDLM_DROP_COUNT;
44 gdlm_drop_period = GDLM_DROP_PERIOD;
45
f382894e
SW
46 printk(KERN_INFO
47 "Lock_DLM (built %s %s) installed\n", __DATE__, __TIME__);
29b7998d
DT
48 return 0;
49}
50
08bc2dbc 51static void __exit exit_lock_dlm(void)
29b7998d 52{
869d81df 53 gdlm_plock_exit();
29b7998d 54 gdlm_sysfs_exit();
3120ec54 55 gfs2_unregister_lockproto(&gdlm_ops);
29b7998d
DT
56}
57
58module_init(init_lock_dlm);
59module_exit(exit_lock_dlm);
60
61MODULE_DESCRIPTION("GFS DLM Locking Module");
62MODULE_AUTHOR("Red Hat, Inc.");
63MODULE_LICENSE("GPL");
64