]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
[DLM] init rwsem earlier
authorDavid Teigland <teigland@redhat.com>
Mon, 19 Jun 2006 13:15:38 +0000 (09:15 -0400)
committerSteven Whitehouse <swhiteho@redhat.com>
Mon, 19 Jun 2006 13:15:38 +0000 (09:15 -0400)
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>
fs/dlm/lowcomms.c

index 75010da95b39e332b88e467ccb69fcfc7392ae19..7ab40422ab578138b1509e5e1729cd40dab5f9d7 100644 (file)
@@ -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;
@@ -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;
 }