Revert "gtp: use exit_batch_rtnl() method"

This reverts commit 85d9663360 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: Idcdef934cbbe6566d020c84086f33964fb30e1e9
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
Greg Kroah-Hartman
2025-02-05 18:23:05 +00:00
parent c4395bd9f7
commit 9a42fba6f8

View File

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