From: Alexander Aring Date: Thu, 17 Nov 2022 17:11:55 -0500 Subject: [Cluster-devel] [PATCH dlm/next 16/18] fs: dlm: use saved sk_error_report() In-Reply-To: <20221117221157.2396743-1-aahringo@redhat.com> References: <20221117221157.2396743-1-aahringo@redhat.com> Message-ID: <20221117221157.2396743-16-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 changes the handling of calling the original sk_error_report() by not putting it on the stack and calling it later. If the listen_sock.sk_error_report() is NULL in this moment it indicates a bug in our implementation. Signed-off-by: Alexander Aring --- fs/dlm/lowcomms.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c index 677e31144ca0..643f9810ec35 100644 --- a/fs/dlm/lowcomms.c +++ b/fs/dlm/lowcomms.c @@ -569,11 +569,8 @@ int dlm_lowcomms_nodes_set_mark(int nodeid, unsigned int mark) static void lowcomms_error_report(struct sock *sk) { struct connection *con = sock2con(sk); - void (*orig_report)(struct sock *) = NULL; struct inet_sock *inet; - orig_report = listen_sock.sk_error_report; - inet = inet_sk(sk); switch (sk->sk_family) { case AF_INET: @@ -618,8 +615,7 @@ static void lowcomms_error_report(struct sock *sk) queue_work(send_workqueue, &con->swork); out: - if (orig_report) - orig_report(sk); + listen_sock.sk_error_report(sk); } static void restore_callbacks(struct socket *sock) -- 2.31.1