summaryrefslogtreecommitdiff
path: root/net/mptcp/pm_userspace.c
diff options
context:
space:
mode:
authorGeliang Tang <geliang.tang@suse.com>2022-11-11 02:23:20 +0300
committerJakub Kicinski <kuba@kernel.org>2022-11-12 08:19:47 +0300
commit80638684e840684042325fa5a3fa1eb59fd123cc (patch)
tree470644a7d02c10bfd24465890d39c0f16e30a5e5 /net/mptcp/pm_userspace.c
parent73a0052a61f98354f39f461e03f1a7e513b84578 (diff)
downloadlinux-80638684e840684042325fa5a3fa1eb59fd123cc.tar.xz
mptcp: get sk from msk directly
Use '(struct sock *)msk' to get 'sk' from 'msk' in a more direct way instead of using '&msk->sk.icsk_inet.sk'. Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com> Signed-off-by: Geliang Tang <geliang.tang@suse.com> Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/mptcp/pm_userspace.c')
-rw-r--r--net/mptcp/pm_userspace.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/mptcp/pm_userspace.c b/net/mptcp/pm_userspace.c
index 9e82250cbb70..5cb65f0928f4 100644
--- a/net/mptcp/pm_userspace.c
+++ b/net/mptcp/pm_userspace.c
@@ -291,7 +291,7 @@ int mptcp_nl_cmd_sf_create(struct sk_buff *skb, struct genl_info *info)
goto create_err;
}
- sk = &msk->sk.icsk_inet.sk;
+ sk = (struct sock *)msk;
lock_sock(sk);
err = __mptcp_subflow_connect(sk, &addr_l, &addr_r);
@@ -403,7 +403,7 @@ int mptcp_nl_cmd_sf_destroy(struct sk_buff *skb, struct genl_info *info)
goto destroy_err;
}
- sk = &msk->sk.icsk_inet.sk;
+ sk = (struct sock *)msk;
lock_sock(sk);
ssk = mptcp_nl_find_ssk(msk, &addr_l, &addr_r);
if (ssk) {