Skip to content

Commit 5d13349

Browse files
Geliang Tangkuba-moo
authored andcommitted
mptcp: remove duplicate sk_reset_timer call
sk_reset_timer() was called twice in mptcp_pm_alloc_anno_list. Simplify the code by using a 'goto' statement to eliminate the duplication. Note that this is not a fix, but it will help backporting the following patch. The same "Fixes" tag has been added for this reason. Fixes: 93f323b ("mptcp: add a new sysctl add_addr_timeout") Cc: [email protected] Signed-off-by: Geliang Tang <[email protected]> Reviewed-by: Matthieu Baerts (NGI0) <[email protected]> Signed-off-by: Matthieu Baerts (NGI0) <[email protected]> Link: https://patch.msgid.link/20250815-net-mptcp-misc-fixes-6-17-rc2-v1-4-521fe9957892@kernel.org Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 452690b commit 5d13349

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

net/mptcp/pm.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -353,9 +353,7 @@ bool mptcp_pm_alloc_anno_list(struct mptcp_sock *msk,
353353
if (WARN_ON_ONCE(mptcp_pm_is_kernel(msk)))
354354
return false;
355355

356-
sk_reset_timer(sk, &add_entry->add_timer,
357-
jiffies + mptcp_get_add_addr_timeout(net));
358-
return true;
356+
goto reset_timer;
359357
}
360358

361359
add_entry = kmalloc(sizeof(*add_entry), GFP_ATOMIC);
@@ -369,6 +367,7 @@ bool mptcp_pm_alloc_anno_list(struct mptcp_sock *msk,
369367
add_entry->retrans_times = 0;
370368

371369
timer_setup(&add_entry->add_timer, mptcp_pm_add_timer, 0);
370+
reset_timer:
372371
sk_reset_timer(sk, &add_entry->add_timer,
373372
jiffies + mptcp_get_add_addr_timeout(net));
374373

0 commit comments

Comments
 (0)