summaryrefslogtreecommitdiffstats
path: root/fs/dlm
diff options
context:
space:
mode:
authorAlexander Aring <aahringo@redhat.com>2020-08-27 15:02:53 -0400
committerDavid Teigland <teigland@redhat.com>2020-08-27 15:59:09 -0500
commit948c47e9bcb6a42229cb1da1cc350c887a33ebb8 (patch)
tree49a5e9524a79341c1de9884295d26048d0681cff /fs/dlm
parent0de984323ac56aa420e6f28d7ce205a293fdb649 (diff)
downloadlinux-948c47e9bcb6a42229cb1da1cc350c887a33ebb8.tar.gz
linux-948c47e9bcb6a42229cb1da1cc350c887a33ebb8.tar.bz2
linux-948c47e9bcb6a42229cb1da1cc350c887a33ebb8.zip
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 <aahringo@redhat.com> Signed-off-by: David Teigland <teigland@redhat.com>
Diffstat (limited to 'fs/dlm')
-rw-r--r--fs/dlm/lowcomms.c6
1 files 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);
}