mptcp: drop useless addr_signal clear
authorGeliang Tang <geliangtang@gmail.com>
Fri, 26 Mar 2021 18:26:39 +0000 (11:26 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 26 Mar 2021 22:05:15 +0000 (15:05 -0700)
msk->pm.addr_signal is cleared in mptcp_pm_add_addr_signal, no need to
clear it in mptcp_pm_nl_add_addr_send_ack again. Drop it.

Signed-off-by: Geliang Tang <geliangtang@gmail.com>
Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/mptcp/pm_netlink.c

index 56d479b..743bd23 100644 (file)
@@ -538,7 +538,6 @@ static void mptcp_pm_nl_add_addr_send_ack(struct mptcp_sock *msk)
        subflow = list_first_entry_or_null(&msk->conn_list, typeof(*subflow), node);
        if (subflow) {
                struct sock *ssk = mptcp_subflow_tcp_sock(subflow);
-               u8 add_addr;
 
                spin_unlock_bh(&msk->pm.lock);
                pr_debug("send ack for add_addr%s%s",
@@ -549,13 +548,6 @@ static void mptcp_pm_nl_add_addr_send_ack(struct mptcp_sock *msk)
                tcp_send_ack(ssk);
                release_sock(ssk);
                spin_lock_bh(&msk->pm.lock);
-
-               add_addr = READ_ONCE(msk->pm.addr_signal);
-               if (mptcp_pm_should_add_signal_ipv6(msk))
-                       add_addr &= ~BIT(MPTCP_ADD_ADDR_IPV6);
-               if (mptcp_pm_should_add_signal_port(msk))
-                       add_addr &= ~BIT(MPTCP_ADD_ADDR_PORT);
-               WRITE_ONCE(msk->pm.addr_signal, add_addr);
        }
 }