From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexander Aring Date: Mon, 19 Oct 2020 14:59:08 -0400 Subject: [Cluster-devel] [PATCH dlm/next 1/9] fs: dlm: fix proper srcu api call In-Reply-To: <20201019185916.707827-1-aahringo@redhat.com> References: <20201019185916.707827-1-aahringo@redhat.com> Message-ID: <20201019185916.707827-2-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 will use call_srcu() instead of call_rcu() because the related datastructure resource are handled under srcu context. I assume the current code is fine anyway since free_conn() must be called when the related resource are not in use otherwise. However it will correct the overall handling in a srcu context. Signed-off-by: Alexander Aring --- fs/dlm/lowcomms.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c index 79f56f16bc2ce..77382c2ce6da2 100644 --- a/fs/dlm/lowcomms.c +++ b/fs/dlm/lowcomms.c @@ -1616,10 +1616,11 @@ static void free_conn(struct connection *con) spin_unlock(&connections_lock); if (con->othercon) { clean_one_writequeue(con->othercon); - call_rcu(&con->othercon->rcu, connection_release); + call_srcu(&connections_srcu, &con->othercon->rcu, + connection_release); } clean_one_writequeue(con); - call_rcu(&con->rcu, connection_release); + call_srcu(&connections_srcu, &con->rcu, connection_release); } static void work_flush(void) -- 2.26.2