Skip to content

Commit

Permalink
mptcp: use the variable sk instead of open-coding
Browse files Browse the repository at this point in the history
Since the local variable sk has been defined, use it instead of
open-coding.

Reviewed-by: Matthieu Baerts <[email protected]>
Signed-off-by: Geliang Tang <[email protected]>
  • Loading branch information
geliangtang authored and jenkins-tessares committed Dec 9, 2020
1 parent 62ad6da commit 389cb8d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/mptcp/pm_netlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ static void mptcp_pm_create_subflow_or_signal_addr(struct mptcp_sock *msk)
struct mptcp_pm_addr_entry *local;
struct pm_nl_pernet *pernet;

pernet = net_generic(sock_net((struct sock *)msk), pm_nl_pernet_id);
pernet = net_generic(sock_net(sk), pm_nl_pernet_id);

pr_debug("local %d:%d signal %d:%d subflows %d:%d\n",
msk->pm.local_addr_used, msk->pm.local_addr_max,
Expand Down Expand Up @@ -399,7 +399,7 @@ void mptcp_pm_nl_add_addr_received(struct mptcp_sock *msk)
local.family = remote.family;

spin_unlock_bh(&msk->pm.lock);
__mptcp_subflow_connect((struct sock *)msk, &local, &remote);
__mptcp_subflow_connect(sk, &local, &remote);
spin_lock_bh(&msk->pm.lock);

mptcp_pm_announce_addr(msk, &remote, true, use_port);
Expand Down

0 comments on commit 389cb8d

Please sign in to comment.