From: Alexander Aring <aahringo@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH dlm/next 8/9] fs: dlm: refactor sctp sock parameter
Date: Mon, 19 Oct 2020 14:59:15 -0400 [thread overview]
Message-ID: <20201019185916.707827-9-aahringo@redhat.com> (raw)
In-Reply-To: <20201019185916.707827-1-aahringo@redhat.com>
This patch refactors sctp_bind_addrs() to work with a socket parameter
instead of a connection parameter.
Signed-off-by: Alexander Aring <aahringo@redhat.com>
---
fs/dlm/lowcomms.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c
index bae4125c22deb..f18d40ba42f97 100644
--- a/fs/dlm/lowcomms.c
+++ b/fs/dlm/lowcomms.c
@@ -947,7 +947,7 @@ static void writequeue_entry_complete(struct writequeue_entry *e, int completed)
/*
* sctp_bind_addrs - bind a SCTP socket to all our addresses
*/
-static int sctp_bind_addrs(struct connection *con, uint16_t port)
+static int sctp_bind_addrs(struct socket *sock, uint16_t port)
{
struct sockaddr_storage localaddr;
struct sockaddr *addr = (struct sockaddr *)&localaddr;
@@ -958,9 +958,9 @@ static int sctp_bind_addrs(struct connection *con, uint16_t port)
make_sockaddr(&localaddr, port, &addr_len);
if (!i)
- result = kernel_bind(con->sock, addr, addr_len);
+ result = kernel_bind(sock, addr, addr_len);
else
- result = sock_bind_add(con->sock->sk, addr, addr_len);
+ result = sock_bind_add(sock->sk, addr, addr_len);
if (result < 0) {
log_print("Can't bind to %d addr number %d, %d.\n",
@@ -1021,7 +1021,7 @@ static void sctp_connect_to_sock(struct connection *con)
add_sock(sock, con);
/* Bind to all addresses. */
- if (sctp_bind_addrs(con, 0))
+ if (sctp_bind_addrs(con->sock, 0))
goto bind_err;
make_sockaddr(&daddr, dlm_config.ci_tcp_port, &addr_len);
@@ -1287,7 +1287,7 @@ static int sctp_listen_for_all(void)
write_unlock_bh(&sock->sk->sk_callback_lock);
/* Bind to all addresses. */
- if (sctp_bind_addrs(con, dlm_config.ci_tcp_port))
+ if (sctp_bind_addrs(con->sock, dlm_config.ci_tcp_port))
goto create_delsock;
result = sock->ops->listen(sock, 5);
--
2.26.2
next prev parent reply other threads:[~2020-10-19 18:59 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-19 18:59 [Cluster-devel] [PATCH dlm/next 0/9] fs: dlm: fixes and change listen socket handling Alexander Aring
2020-10-19 18:59 ` [Cluster-devel] [PATCH dlm/next 1/9] fs: dlm: fix proper srcu api call Alexander Aring
2020-10-19 18:59 ` [Cluster-devel] [PATCH dlm/next 2/9] fs: dlm: define max send buffer Alexander Aring
2020-10-19 18:59 ` [Cluster-devel] [PATCH dlm/next 3/9] fs: dlm: add get buffer error handling Alexander Aring
2020-10-19 18:59 ` [Cluster-devel] [PATCH dlm/next 4/9] fs: dlm: flush othercon at close Alexander Aring
2020-10-19 18:59 ` [Cluster-devel] [PATCH dlm/next 5/9] fs: dlm: handle non blocked connect event Alexander Aring
2020-10-19 18:59 ` [Cluster-devel] [PATCH dlm/next 6/9] fs: dlm: move connect callback in node creation Alexander Aring
2020-10-19 18:59 ` [Cluster-devel] [PATCH dlm/next 7/9] fs: dlm: move shutdown action to " Alexander Aring
2020-10-19 18:59 ` Alexander Aring [this message]
2020-10-19 18:59 ` [Cluster-devel] [PATCH dlm/next 9/9] fs: dlm: listen socket out of connection hash 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=20201019185916.707827-9-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).