From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexander Aring Date: Thu, 27 Aug 2020 15:02:53 -0400 Subject: [Cluster-devel] [PATCH dlm/next 6/7] fs: dlm: handle possible othercon writequeues In-Reply-To: <20200827190254.719333-1-aahringo@redhat.com> References: <20200827190254.719333-1-aahringo@redhat.com> Message-ID: <20200827190254.719333-7-aahringo@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit This patch adds free of possible other writequeue entries in othercon member of struct connection. Signed-off-by: Alexander Aring --- fs/dlm/lowcomms.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c index 04afc7178afb..794216eb728c 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); } -- 2.26.2