From: Alexander Aring <aahringo@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH dlm/next 5/7] fs: dlm: move free writequeue into con free
Date: Thu, 27 Aug 2020 15:02:52 -0400 [thread overview]
Message-ID: <20200827190254.719333-6-aahringo@redhat.com> (raw)
In-Reply-To: <20200827190254.719333-1-aahringo@redhat.com>
This patch just move the free of struct connection member writequeue
into the functionality when struct connection will be freed instead of
doing two iterations.
Signed-off-by: Alexander Aring <aahringo@redhat.com>
---
fs/dlm/lowcomms.c | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c
index d0ece252a0d9..04afc7178afb 100644
--- a/fs/dlm/lowcomms.c
+++ b/fs/dlm/lowcomms.c
@@ -1550,13 +1550,6 @@ static void process_send_sockets(struct work_struct *work)
send_to_sock(con);
}
-
-/* Discard all entries on the write queues */
-static void clean_writequeues(void)
-{
- foreach_conn(clean_one_writequeue);
-}
-
static void work_stop(void)
{
if (recv_workqueue)
@@ -1620,6 +1613,7 @@ static void free_conn(struct connection *con)
spin_lock(&connections_lock);
hlist_del_rcu(&con->list);
spin_unlock(&connections_lock);
+ clean_one_writequeue(con);
kfree_rcu(con, rcu);
}
@@ -1668,7 +1662,6 @@ void dlm_lowcomms_stop(void)
foreach_conn(shutdown_conn);
work_flush();
- clean_writequeues();
foreach_conn(free_conn);
work_stop();
deinit_local();
--
2.26.2
next prev parent reply other threads:[~2020-08-27 19:02 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-27 19:02 [Cluster-devel] [PATCH dlm/next 0/7] fs: dlm: locking and memory fixes Alexander Aring
2020-08-27 19:02 ` [Cluster-devel] [PATCH dlm/next 1/7] fs: dlm: synchronize dlm before shutdown Alexander Aring
2020-08-27 19:02 ` [Cluster-devel] [PATCH dlm/next 2/7] fs: dlm: make connection hash lockless Alexander Aring
2020-08-27 19:02 ` [Cluster-devel] [PATCH dlm/next 3/7] fs: dlm: fix dlm_local_addr memory leak Alexander Aring
2020-08-27 19:02 ` [Cluster-devel] [PATCH dlm/next 4/7] fs: dlm: fix configfs " Alexander Aring
2020-08-27 19:02 ` Alexander Aring [this message]
2020-08-27 19:02 ` [Cluster-devel] [PATCH dlm/next 6/7] fs: dlm: handle possible othercon writequeues Alexander Aring
2020-08-27 19:02 ` [Cluster-devel] [PATCH dlm/next 7/7] fs: dlm: use free_con to free connection Alexander Aring
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200827190254.719333-6-aahringo@redhat.com \
--to=aahringo@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).