提交 5c45121d 编写于 作者: F Florian Westphal 提交者: David S. Miller

rtnetlink: remove __rtnl_af_unregister

switch the only caller to rtnl_af_unregister.
Signed-off-by: NFlorian Westphal <fw@strlen.de>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 e774d96b
...@@ -151,8 +151,6 @@ struct rtnl_af_ops { ...@@ -151,8 +151,6 @@ struct rtnl_af_ops {
size_t (*get_stats_af_size)(const struct net_device *dev); size_t (*get_stats_af_size)(const struct net_device *dev);
}; };
void __rtnl_af_unregister(struct rtnl_af_ops *ops);
void rtnl_af_register(struct rtnl_af_ops *ops); void rtnl_af_register(struct rtnl_af_ops *ops);
void rtnl_af_unregister(struct rtnl_af_ops *ops); void rtnl_af_unregister(struct rtnl_af_ops *ops);
......
...@@ -475,18 +475,6 @@ void rtnl_af_register(struct rtnl_af_ops *ops) ...@@ -475,18 +475,6 @@ void rtnl_af_register(struct rtnl_af_ops *ops)
} }
EXPORT_SYMBOL_GPL(rtnl_af_register); EXPORT_SYMBOL_GPL(rtnl_af_register);
/**
* __rtnl_af_unregister - Unregister rtnl_af_ops from rtnetlink.
* @ops: struct rtnl_af_ops * to unregister
*
* The caller must hold the rtnl_mutex.
*/
void __rtnl_af_unregister(struct rtnl_af_ops *ops)
{
list_del(&ops->list);
}
EXPORT_SYMBOL_GPL(__rtnl_af_unregister);
/** /**
* rtnl_af_unregister - Unregister rtnl_af_ops from rtnetlink. * rtnl_af_unregister - Unregister rtnl_af_ops from rtnetlink.
* @ops: struct rtnl_af_ops * to unregister * @ops: struct rtnl_af_ops * to unregister
...@@ -494,7 +482,7 @@ EXPORT_SYMBOL_GPL(__rtnl_af_unregister); ...@@ -494,7 +482,7 @@ EXPORT_SYMBOL_GPL(__rtnl_af_unregister);
void rtnl_af_unregister(struct rtnl_af_ops *ops) void rtnl_af_unregister(struct rtnl_af_ops *ops)
{ {
rtnl_lock(); rtnl_lock();
__rtnl_af_unregister(ops); list_del(&ops->list);
rtnl_unlock(); rtnl_unlock();
} }
EXPORT_SYMBOL_GPL(rtnl_af_unregister); EXPORT_SYMBOL_GPL(rtnl_af_unregister);
......
...@@ -6618,9 +6618,9 @@ void addrconf_cleanup(void) ...@@ -6618,9 +6618,9 @@ void addrconf_cleanup(void)
unregister_pernet_subsys(&addrconf_ops); unregister_pernet_subsys(&addrconf_ops);
ipv6_addr_label_cleanup(); ipv6_addr_label_cleanup();
rtnl_lock(); rtnl_af_unregister(&inet6_ops);
__rtnl_af_unregister(&inet6_ops); rtnl_lock();
/* clean dev list */ /* clean dev list */
for_each_netdev(&init_net, dev) { for_each_netdev(&init_net, dev) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册