提交 0de98432 编写于 作者: A Alexander Aring 提交者: David Teigland

fs: dlm: move free writequeue into con free

This patch just move the free of struct connection member writequeue
into the functionality when struct connection will be freed instead of
doing two iterations.
Signed-off-by: NAlexander Aring <aahringo@redhat.com>
Signed-off-by: NDavid Teigland <teigland@redhat.com>
上级 3d2825c8
......@@ -1550,13 +1550,6 @@ static void process_send_sockets(struct work_struct *work)
send_to_sock(con);
}
/* Discard all entries on the write queues */
static void clean_writequeues(void)
{
foreach_conn(clean_one_writequeue);
}
static void work_stop(void)
{
if (recv_workqueue)
......@@ -1620,6 +1613,7 @@ static void free_conn(struct connection *con)
spin_lock(&connections_lock);
hlist_del_rcu(&con->list);
spin_unlock(&connections_lock);
clean_one_writequeue(con);
kfree_rcu(con, rcu);
}
......@@ -1668,7 +1662,6 @@ void dlm_lowcomms_stop(void)
foreach_conn(shutdown_conn);
work_flush();
clean_writequeues();
foreach_conn(free_conn);
work_stop();
deinit_local();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册