Revert "gtp: use exit_batch_rtnl() method"

This reverts commit a3fdd5f3d6 which is
commit 6eedda01b2bfdcf427b37759e053dc27232f3af1 upstream.

It breaks the Android kernel abi and can be brought back in the future
in an abi-safe way if it is really needed.

Bug: 161946584
Change-Id: I6d0ce9375026632d6e27f9ec83c408fdee344963
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
Greg Kroah-Hartman
2025-02-06 11:35:52 +00:00
parent da69d6681f
commit 5b18fc7e2e

View File

@@ -1883,23 +1883,23 @@ static int __net_init gtp_net_init(struct net *net)
return 0; return 0;
} }
static void __net_exit gtp_net_exit_batch_rtnl(struct list_head *net_list, static void __net_exit gtp_net_exit(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;
LIST_HEAD(list);
list_for_each_entry(net, net_list, exit_list) { rtnl_lock();
struct gtp_net *gn = net_generic(net, gtp_net_id); list_for_each_entry(gtp, &gn->gtp_dev_list, list)
struct gtp_dev *gtp; gtp_dellink(gtp->dev, &list);
list_for_each_entry(gtp, &gn->gtp_dev_list, list) unregister_netdevice_many(&list);
gtp_dellink(gtp->dev, dev_to_kill); rtnl_unlock();
}
} }
static struct pernet_operations gtp_net_ops = { static struct pernet_operations gtp_net_ops = {
.init = gtp_net_init, .init = gtp_net_init,
.exit_batch_rtnl = gtp_net_exit_batch_rtnl, .exit = gtp_net_exit,
.id = &gtp_net_id, .id = &gtp_net_id,
.size = sizeof(struct gtp_net), .size = sizeof(struct gtp_net),
}; };