From: Alexander Aring Date: Thu, 27 Aug 2020 19:02:53 +0000 (-0400) Subject: fs: dlm: handle possible othercon writequeues X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=948c47e9bcb6a42229cb1da1cc350c887a33ebb8;p=linux.git fs: dlm: handle possible othercon writequeues This patch adds free of possible other writequeue entries in othercon member of struct connection. Signed-off-by: Alexander Aring Signed-off-by: David Teigland --- diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c index 04afc7178afb1..794216eb728cc 100644 --- a/fs/dlm/lowcomms.c +++ b/fs/dlm/lowcomms.c @@ -1608,11 +1608,13 @@ static void shutdown_conn(struct connection *con) static void free_conn(struct connection *con) { close_connection(con, true, true, true); - if (con->othercon) - kfree_rcu(con->othercon, rcu); spin_lock(&connections_lock); hlist_del_rcu(&con->list); spin_unlock(&connections_lock); + if (con->othercon) { + clean_one_writequeue(con->othercon); + kfree_rcu(con->othercon, rcu); + } clean_one_writequeue(con); kfree_rcu(con, rcu); }