Files
OrangePi_CM5/fs/gfs2/locking/dlm/main.c
T

48 lines
1.0 KiB
C
Raw Normal View History

2006-01-17 08:47:12 +00:00
/*
* Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved.
* Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved.
*
* This copyrighted material is made available to anyone wishing to use,
* modify, copy, or redistribute it subject to the terms and conditions
2006-09-01 11:05:15 -04:00
* of the GNU General Public License version 2.
2006-01-17 08:47:12 +00:00
*/
2006-01-16 16:52:38 +00:00
#include <linux/init.h>
#include "lock_dlm.h"
static int __init init_lock_dlm(void)
2006-01-16 16:52:38 +00:00
{
int error;
2006-08-04 13:14:50 -05:00
error = gfs2_register_lockproto(&gdlm_ops);
2006-01-16 16:52:38 +00:00
if (error) {
2006-02-27 12:07:05 -05:00
printk(KERN_WARNING "lock_dlm: can't register protocol: %d\n",
error);
2006-01-16 16:52:38 +00:00
return error;
}
error = gdlm_sysfs_init();
if (error) {
2006-08-04 13:14:50 -05:00
gfs2_unregister_lockproto(&gdlm_ops);
2006-01-17 08:47:12 +00:00
return error;
}
2006-02-27 12:07:05 -05:00
printk(KERN_INFO
"Lock_DLM (built %s %s) installed\n", __DATE__, __TIME__);
2006-01-16 16:52:38 +00:00
return 0;
}
static void __exit exit_lock_dlm(void)
2006-01-16 16:52:38 +00:00
{
gdlm_sysfs_exit();
2006-08-04 13:14:50 -05:00
gfs2_unregister_lockproto(&gdlm_ops);
2006-01-16 16:52:38 +00:00
}
module_init(init_lock_dlm);
module_exit(exit_lock_dlm);
MODULE_DESCRIPTION("GFS DLM Locking Module");
MODULE_AUTHOR("Red Hat, Inc.");
MODULE_LICENSE("GPL");