Skip to content

Commit

Permalink
dlm: move plock code from gfs2
Browse files Browse the repository at this point in the history
Move the code that handles cluster posix locks from gfs2 into the dlm
so that it can be used by both gfs2 and ocfs2.

Signed-off-by: David Teigland <[email protected]>
  • Loading branch information
teigland committed Apr 21, 2008
1 parent d44e0fc commit 2402211
Show file tree
Hide file tree
Showing 11 changed files with 185 additions and 130 deletions.
1 change: 1 addition & 0 deletions fs/dlm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ dlm-y := ast.o \
midcomms.o \
netlink.o \
lowcomms.o \
plock.o \
rcom.o \
recover.o \
recoverd.o \
Expand Down
2 changes: 2 additions & 0 deletions fs/dlm/dlm_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -582,6 +582,8 @@ static inline int dlm_no_directory(struct dlm_ls *ls)
int dlm_netlink_init(void);
void dlm_netlink_exit(void);
void dlm_timeout_warn(struct dlm_lkb *lkb);
int dlm_plock_init(void);
void dlm_plock_exit(void);

#ifdef CONFIG_DLM_DEBUG
int dlm_register_debugfs(void);
Expand Down
7 changes: 7 additions & 0 deletions fs/dlm/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,16 @@ static int __init init_dlm(void)
if (error)
goto out_user;

error = dlm_plock_init();
if (error)
goto out_netlink;

printk("DLM (built %s %s) installed\n", __DATE__, __TIME__);

return 0;

out_netlink:
dlm_netlink_exit();
out_user:
dlm_user_exit();
out_debug:
Expand All @@ -66,6 +72,7 @@ static int __init init_dlm(void)

static void __exit exit_dlm(void)
{
dlm_plock_exit();
dlm_netlink_exit();
dlm_user_exit();
dlm_config_exit();
Expand Down
Loading

0 comments on commit 2402211

Please sign in to comment.