From: Alexander Aring <aahringo@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH v5.14-rc1 01/12] fs: dlm: use sk->sk_socket instead of con->sock
Date: Fri, 16 Jul 2021 16:22:34 -0400 [thread overview]
Message-ID: <20210716202245.1262791-2-aahringo@redhat.com> (raw)
In-Reply-To: <20210716202245.1262791-1-aahringo@redhat.com>
Instead of dereference "con->sock" we can get the socket structure over
"sk->sk_socket" as well. This patch will switch to this behaviour.
Signed-off-by: Alexander Aring <aahringo@redhat.com>
---
fs/dlm/lowcomms.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c
index 0ea9ae35da0b..bf309c12a2c0 100644
--- a/fs/dlm/lowcomms.c
+++ b/fs/dlm/lowcomms.c
@@ -583,8 +583,7 @@ static void lowcomms_error_report(struct sock *sk)
goto out;
orig_report = listen_sock.sk_error_report;
- if (con->sock == NULL ||
- kernel_getpeername(con->sock, (struct sockaddr *)&saddr) < 0) {
+ if (kernel_getpeername(sk->sk_socket, (struct sockaddr *)&saddr) < 0) {
printk_ratelimited(KERN_ERR "dlm: node %d: socket error "
"sending to node %d, port %d, "
"sk_err=%d/%d\n", dlm_our_nodeid(),
--
2.27.0
next prev parent reply other threads:[~2021-07-16 20:22 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-16 20:22 [Cluster-devel] [PATCH v5.14-rc1 00/12] fs: dlm: combine similar functionaility Alexander Aring
2021-07-16 20:22 ` Alexander Aring [this message]
2021-07-16 20:22 ` [Cluster-devel] [PATCH v5.14-rc1 02/12] fs: dlm: use READ_ONCE for config var Alexander Aring
2021-07-16 20:22 ` [Cluster-devel] [PATCH v5.14-rc1 03/12] fs: dlm: fix typo in tlv prefix Alexander Aring
2021-07-16 20:22 ` [Cluster-devel] [PATCH v5.14-rc1 04/12] fs: dlm: clear CF_APP_LIMITED on close Alexander Aring
2021-07-16 20:22 ` [Cluster-devel] [PATCH v5.14-rc1 05/12] fs: dlm: cleanup and remove _send_rcom Alexander Aring
2021-07-16 20:22 ` [Cluster-devel] [PATCH v5.14-rc1 06/12] fs: dlm: introduce con_next_wq helper Alexander Aring
2021-07-16 20:22 ` [Cluster-devel] [PATCH v5.14-rc1 07/12] fs: dlm: move to static proto ops Alexander Aring
2021-07-16 20:22 ` [Cluster-devel] [PATCH v5.14-rc1 08/12] fs: dlm: introduce generic listen Alexander Aring
2021-07-16 20:22 ` [Cluster-devel] [PATCH v5.14-rc1 09/12] fs: dlm: auto load sctp module Alexander Aring
2021-07-16 20:22 ` [Cluster-devel] [PATCH v5.14-rc1 10/12] fs: dlm: generic connect func Alexander Aring
2021-07-16 20:22 ` [Cluster-devel] [PATCH v5.14-rc1 11/12] fs: dlm: fix multiple empty writequeue alloc Alexander Aring
2021-07-16 20:22 ` [Cluster-devel] [PATCH v5.14-rc1 12/12] fs: dlm: move receive loop into receive handler 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=20210716202245.1262791-2-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).