Skip to content

Commit

Permalink
[DLM] init rwsem earlier
Browse files Browse the repository at this point in the history
The nodeinfo_lock rwsem needs to be initialized when the module is loaded
instead of when the dlm is first used.

Signed-off-by: David Teigland <teigland@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
  • Loading branch information
David Teigland authored and Steven Whitehouse committed Jun 19, 2006
1 parent 3a8476d commit 7d5513d
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions fs/dlm/lowcomms.c
Original file line number Diff line number Diff line change
Expand Up @@ -1190,10 +1190,6 @@ int dlm_lowcomms_start(void)
{
int error;

spin_lock_init(&write_nodes_lock);
INIT_LIST_HEAD(&write_nodes);
init_rwsem(&nodeinfo_lock);

error = init_sock();
if (error)
goto fail_sock;
Expand Down Expand Up @@ -1224,6 +1220,9 @@ void dlm_lowcomms_stop(void)
int dlm_lowcomms_init(void)
{
init_waitqueue_head(&lowcomms_recv_wait);
spin_lock_init(&write_nodes_lock);
INIT_LIST_HEAD(&write_nodes);
init_rwsem(&nodeinfo_lock);
return 0;
}

Expand Down

0 comments on commit 7d5513d

Please sign in to comment.