net: Simplify loopback and improve batching.
Defer calling unregister_netdevice_queue to cleanup_net. It's simpler and it allows the loopback device to land in the same batch as other network devices. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
f875bae065
commit
999b6d39ab
@@ -212,15 +212,7 @@ out:
|
|||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
static __net_exit void loopback_net_exit(struct net *net)
|
|
||||||
{
|
|
||||||
struct net_device *dev = net->loopback_dev;
|
|
||||||
|
|
||||||
unregister_netdev(dev);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Registered in net/core/dev.c */
|
/* Registered in net/core/dev.c */
|
||||||
struct pernet_operations __net_initdata loopback_net_ops = {
|
struct pernet_operations __net_initdata loopback_net_ops = {
|
||||||
.init = loopback_net_init,
|
.init = loopback_net_init,
|
||||||
.exit = loopback_net_exit,
|
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user