net: spread __net_init, __net_exit
__net_init/__net_exit are apparently not going away, so use them to full extent. In some cases __net_init was removed, because it was called from __net_exit code. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
这个提交包含在:
@@ -3307,7 +3307,7 @@ static void bond_remove_proc_entry(struct bonding *bond)
|
||||
/* Create the bonding directory under /proc/net, if doesn't exist yet.
|
||||
* Caller must hold rtnl_lock.
|
||||
*/
|
||||
static void bond_create_proc_dir(struct bond_net *bn)
|
||||
static void __net_init bond_create_proc_dir(struct bond_net *bn)
|
||||
{
|
||||
if (!bn->proc_dir) {
|
||||
bn->proc_dir = proc_mkdir(DRV_NAME, bn->net->proc_net);
|
||||
@@ -3320,7 +3320,7 @@ static void bond_create_proc_dir(struct bond_net *bn)
|
||||
/* Destroy the bonding directory under /proc/net, if empty.
|
||||
* Caller must hold rtnl_lock.
|
||||
*/
|
||||
static void bond_destroy_proc_dir(struct bond_net *bn)
|
||||
static void __net_exit bond_destroy_proc_dir(struct bond_net *bn)
|
||||
{
|
||||
if (bn->proc_dir) {
|
||||
remove_proc_entry(DRV_NAME, bn->net->proc_net);
|
||||
@@ -3338,11 +3338,11 @@ static void bond_remove_proc_entry(struct bonding *bond)
|
||||
{
|
||||
}
|
||||
|
||||
static void bond_create_proc_dir(struct bond_net *bn)
|
||||
static inline void bond_create_proc_dir(struct bond_net *bn)
|
||||
{
|
||||
}
|
||||
|
||||
static void bond_destroy_proc_dir(struct bond_net *bn)
|
||||
static inline void bond_destroy_proc_dir(struct bond_net *bn)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -4955,7 +4955,7 @@ out_netdev:
|
||||
goto out;
|
||||
}
|
||||
|
||||
static int bond_net_init(struct net *net)
|
||||
static int __net_init bond_net_init(struct net *net)
|
||||
{
|
||||
struct bond_net *bn = net_generic(net, bond_net_id);
|
||||
|
||||
@@ -4967,7 +4967,7 @@ static int bond_net_init(struct net *net)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void bond_net_exit(struct net *net)
|
||||
static void __net_exit bond_net_exit(struct net *net)
|
||||
{
|
||||
struct bond_net *bn = net_generic(net, bond_net_id);
|
||||
|
||||
|
在新工单中引用
屏蔽一个用户