Skip to content

Commit 364a708

Browse files
matttbekuba-moo
authored andcommitted
mptcp: pm: in-kernel: clarify mptcp_pm_remove_anno_addr()
The variable 'ret' was used, but it was not cleared what it was, and probably led to an issue [1]. Rename it to 'announced' to avoid confusions. While at it, remove the returned value of the helper: it is only used in one place, and the returned value is not used. Link: multipath-tcp/mptcp_net-next#606 [1] Reviewed-by: Mat Martineau <martineau@kernel.org> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org> Link: https://patch.msgid.link/20260205-net-mptcp-misc-fixes-6-19-rc8-v2-2-c2720ce75c34@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent d191101 commit 364a708

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

net/mptcp/pm_kernel.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1044,24 +1044,23 @@ int mptcp_pm_nl_add_addr_doit(struct sk_buff *skb, struct genl_info *info)
10441044
return ret;
10451045
}
10461046

1047-
static bool mptcp_pm_remove_anno_addr(struct mptcp_sock *msk,
1047+
static void mptcp_pm_remove_anno_addr(struct mptcp_sock *msk,
10481048
const struct mptcp_addr_info *addr,
10491049
bool force)
10501050
{
10511051
struct mptcp_rm_list list = { .nr = 0 };
1052-
bool ret;
1052+
bool announced;
10531053

10541054
list.ids[list.nr++] = mptcp_endp_get_local_id(msk, addr);
10551055

1056-
ret = mptcp_remove_anno_list_by_saddr(msk, addr);
1057-
if (ret || force) {
1056+
announced = mptcp_remove_anno_list_by_saddr(msk, addr);
1057+
if (announced || force) {
10581058
spin_lock_bh(&msk->pm.lock);
1059-
if (ret)
1059+
if (announced)
10601060
msk->pm.add_addr_signaled--;
10611061
mptcp_pm_remove_addr(msk, &list);
10621062
spin_unlock_bh(&msk->pm.lock);
10631063
}
1064-
return ret;
10651064
}
10661065

10671066
static void __mark_subflow_endp_available(struct mptcp_sock *msk, u8 id)

0 commit comments

Comments
 (0)