mptcp: drop free_list for deleting entries
authorGeliang Tang <tanggeliang@kylinos.cn>
Fri, 13 Dec 2024 19:52:56 +0000 (20:52 +0100)
committerJakub Kicinski <kuba@kernel.org>
Sun, 15 Dec 2024 22:28:34 +0000 (14:28 -0800)
commit88d0973163711a5313ddd479a1ff543b5ac93d51
tree7d5fcfed9c8754d53c24fa8f2bdd4a27048a058f
parent8008e77e07418a2a43235c2288430602b0d4c8da
mptcp: drop free_list for deleting entries

mptcp_pm_remove_addrs() actually only deletes one address, which does
not match its name. This patch renames it to mptcp_pm_remove_addr_entry()
and changes the parameter "rm_list" to "entry".

With the help of mptcp_pm_remove_addr_entry(), it's no longer necessary to
move the entry to be deleted to free_list and then traverse the list to
delete the entry, which is not allowed in BPF. The entry can be directly
deleted through list_del_rcu() and sock_kfree_s() now.

Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
Reviewed-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://patch.msgid.link/20241213-net-next-mptcp-pm-misc-cleanup-v1-5-ddb6d00109a8@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/mptcp/pm_userspace.c
net/mptcp/protocol.h