Commit 948c47e9 authored by Alexander Aring's avatar Alexander Aring Committed by David Teigland

fs: dlm: handle possible othercon writequeues

This patch adds free of possible other writequeue entries in othercon
member of struct connection.
Signed-off-by: default avatarAlexander Aring <aahringo@redhat.com>
Signed-off-by: default avatarDavid Teigland <teigland@redhat.com>
parent 0de98432
...@@ -1608,11 +1608,13 @@ static void shutdown_conn(struct connection *con) ...@@ -1608,11 +1608,13 @@ static void shutdown_conn(struct connection *con)
static void free_conn(struct connection *con) static void free_conn(struct connection *con)
{ {
close_connection(con, true, true, true); close_connection(con, true, true, true);
if (con->othercon)
kfree_rcu(con->othercon, rcu);
spin_lock(&connections_lock); spin_lock(&connections_lock);
hlist_del_rcu(&con->list); hlist_del_rcu(&con->list);
spin_unlock(&connections_lock); spin_unlock(&connections_lock);
if (con->othercon) {
clean_one_writequeue(con->othercon);
kfree_rcu(con->othercon, rcu);
}
clean_one_writequeue(con); clean_one_writequeue(con);
kfree_rcu(con, rcu); kfree_rcu(con, rcu);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment