diff options
author | David Teigland <teigland@redhat.com> | 2006-06-19 09:15:38 -0400 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2006-06-19 09:15:38 -0400 |
commit | 7d5513d58d072cf38cae9c886653aadac38ef4a9 (patch) | |
tree | f5682cf77d5faa0e660eb46c1d288ff0b8b60089 /fs/dlm/lowcomms.c | |
parent | 3a8476dda13bc6690c5c2d5f1d3078048392c188 (diff) |
[DLM] init rwsem earlier
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>
Diffstat (limited to 'fs/dlm/lowcomms.c')
-rw-r--r-- | fs/dlm/lowcomms.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c index 75010da95b39..7ab40422ab57 100644 --- a/fs/dlm/lowcomms.c +++ b/fs/dlm/lowcomms.c | |||
@@ -1190,10 +1190,6 @@ int dlm_lowcomms_start(void) | |||
1190 | { | 1190 | { |
1191 | int error; | 1191 | int error; |
1192 | 1192 | ||
1193 | spin_lock_init(&write_nodes_lock); | ||
1194 | INIT_LIST_HEAD(&write_nodes); | ||
1195 | init_rwsem(&nodeinfo_lock); | ||
1196 | |||
1197 | error = init_sock(); | 1193 | error = init_sock(); |
1198 | if (error) | 1194 | if (error) |
1199 | goto fail_sock; | 1195 | goto fail_sock; |
@@ -1224,6 +1220,9 @@ void dlm_lowcomms_stop(void) | |||
1224 | int dlm_lowcomms_init(void) | 1220 | int dlm_lowcomms_init(void) |
1225 | { | 1221 | { |
1226 | init_waitqueue_head(&lowcomms_recv_wait); | 1222 | init_waitqueue_head(&lowcomms_recv_wait); |
1223 | spin_lock_init(&write_nodes_lock); | ||
1224 | INIT_LIST_HEAD(&write_nodes); | ||
1225 | init_rwsem(&nodeinfo_lock); | ||
1227 | return 0; | 1226 | return 0; |
1228 | } | 1227 | } |
1229 | 1228 | ||