Skip to content

Commit

Permalink
rtnetlink: remove __rtnl_af_unregister
Browse files Browse the repository at this point in the history
switch the only caller to rtnl_af_unregister.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Florian Westphal authored and David S. Miller committed Oct 4, 2017
1 parent e774d96 commit 5c45121
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 17 deletions.
2 changes: 0 additions & 2 deletions include/net/rtnetlink.h
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,6 @@ struct rtnl_af_ops {
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_unregister(struct rtnl_af_ops *ops);

Expand Down
14 changes: 1 addition & 13 deletions net/core/rtnetlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -475,26 +475,14 @@ void rtnl_af_register(struct rtnl_af_ops *ops)
}
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.
* @ops: struct rtnl_af_ops * to unregister
*/
void rtnl_af_unregister(struct rtnl_af_ops *ops)
{
rtnl_lock();
__rtnl_af_unregister(ops);
list_del(&ops->list);
rtnl_unlock();
}
EXPORT_SYMBOL_GPL(rtnl_af_unregister);
Expand Down
4 changes: 2 additions & 2 deletions net/ipv6/addrconf.c
Original file line number Diff line number Diff line change
Expand Up @@ -6618,9 +6618,9 @@ void addrconf_cleanup(void)
unregister_pernet_subsys(&addrconf_ops);
ipv6_addr_label_cleanup();

rtnl_lock();
rtnl_af_unregister(&inet6_ops);

__rtnl_af_unregister(&inet6_ops);
rtnl_lock();

/* clean dev list */
for_each_netdev(&init_net, dev) {
Expand Down

0 comments on commit 5c45121

Please sign in to comment.