mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 06:24:43 +01:00
gtp: Convert gtp_net_exit_batch_rtnl() to ->exit_rtnl().
gtp_net_exit_batch_rtnl() iterates the dying netns list and performs the same operations for each. Let's use ->exit_rtnl(). Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com> Reviewed-by: Sabrina Dubroca <sd@queasysnail.net> Link: https://patch.msgid.link/20250411205258.63164-12-kuniyu@amazon.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
baf720334c
commit
bc7eaf7a40
1 changed files with 7 additions and 11 deletions
|
|
@ -2475,23 +2475,19 @@ static int __net_init gtp_net_init(struct net *net)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void __net_exit gtp_net_exit_batch_rtnl(struct list_head *net_list,
|
||||
struct list_head *dev_to_kill)
|
||||
static void __net_exit gtp_net_exit_rtnl(struct net *net,
|
||||
struct list_head *dev_to_kill)
|
||||
{
|
||||
struct net *net;
|
||||
struct gtp_net *gn = net_generic(net, gtp_net_id);
|
||||
struct gtp_dev *gtp, *gtp_next;
|
||||
|
||||
list_for_each_entry(net, net_list, exit_list) {
|
||||
struct gtp_net *gn = net_generic(net, gtp_net_id);
|
||||
struct gtp_dev *gtp, *gtp_next;
|
||||
|
||||
list_for_each_entry_safe(gtp, gtp_next, &gn->gtp_dev_list, list)
|
||||
gtp_dellink(gtp->dev, dev_to_kill);
|
||||
}
|
||||
list_for_each_entry_safe(gtp, gtp_next, &gn->gtp_dev_list, list)
|
||||
gtp_dellink(gtp->dev, dev_to_kill);
|
||||
}
|
||||
|
||||
static struct pernet_operations gtp_net_ops = {
|
||||
.init = gtp_net_init,
|
||||
.exit_batch_rtnl = gtp_net_exit_batch_rtnl,
|
||||
.exit_rtnl = gtp_net_exit_rtnl,
|
||||
.id = >p_net_id,
|
||||
.size = sizeof(struct gtp_net),
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue