Skip to content

Commit

Permalink
fs: dlm: handle possible othercon writequeues
Browse files Browse the repository at this point in the history
This patch adds free of possible other writequeue entries in othercon
member of struct connection.

Signed-off-by: Alexander Aring <[email protected]>
Signed-off-by: David Teigland <[email protected]>
  • Loading branch information
Alexander Aring authored and teigland committed Aug 27, 2020
1 parent 0de9843 commit 948c47e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions fs/dlm/lowcomms.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 948c47e

Please sign in to comment.