提交 7d5513d5 编写于 作者: D David Teigland 提交者: Steven Whitehouse

[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: NDavid Teigland <teigland@redhat.com>
Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
上级 3a8476dd
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册