]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
mptcp: pm: make mptcp_pm_add_addr_send_ack static
authorMatthieu Baerts (NGI0) <matttbe@kernel.org>
Fri, 5 Jun 2026 09:21:57 +0000 (19:21 +1000)
committerJakub Kicinski <kuba@kernel.org>
Thu, 11 Jun 2026 22:33:39 +0000 (15:33 -0700)
Only used in pm.c.

Note that the signature is added above: it is easier than moving the
code around, because this helper depends on mptcp_pm_schedule_work which
is declared below.

While at it, explicitly mark it as to be called while pm->lock is held.

Reviewed-by: Mat Martineau <martineau@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://patch.msgid.link/20260605-net-next-mptcp-add-addr6-port-ts-v2-13-758e7ca73f4d@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/mptcp/pm.c
net/mptcp/protocol.h

index 684ae8650c19fe29e90a4d48d671f3202a037b7e..f4604611f10f022b961e54c6c1871b137a7c6127 100644 (file)
@@ -226,6 +226,7 @@ static bool subflow_in_rm_list(const struct mptcp_subflow_context *subflow,
        return false;
 }
 
+static void mptcp_pm_add_addr_send_ack(struct mptcp_sock *msk);
 static void
 mptcp_pm_addr_send_ack_avoid_list(struct mptcp_sock *msk,
                                  const struct mptcp_rm_list *rm_list)
@@ -743,7 +744,8 @@ void mptcp_pm_add_addr_echoed(struct mptcp_sock *msk,
        spin_unlock_bh(&pm->lock);
 }
 
-void mptcp_pm_add_addr_send_ack(struct mptcp_sock *msk)
+/* To be called while pm->lock is held */
+static void mptcp_pm_add_addr_send_ack(struct mptcp_sock *msk)
 {
        if (!mptcp_pm_should_add_signal(msk))
                return;
index 8bfb351c6257fb996794f5ce0c9039f808cf2519..7bc8fd486e817f1a29f47d6bb84960f27ed9a8ea 100644 (file)
@@ -1114,7 +1114,6 @@ void mptcp_pm_add_addr_received(const struct sock *ssk,
                                const struct mptcp_addr_info *addr);
 void mptcp_pm_add_addr_echoed(struct mptcp_sock *msk,
                              const struct mptcp_addr_info *addr);
-void mptcp_pm_add_addr_send_ack(struct mptcp_sock *msk);
 void mptcp_pm_send_ack(struct mptcp_sock *msk,
                       struct mptcp_subflow_context *subflow,
                       bool prio, bool backup);