diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2011-10-12 21:56:25 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-10-19 19:24:15 -0400 |
commit | 4c22400ab64d434a00ecbe0c655a16956c902aa8 (patch) | |
tree | 7806378cebccfea754fb566b9a707167071ad207 /drivers/net/bonding/bond_main.c | |
parent | 672d82c18d222e51b40ff47e660fc54ec3e3e0a9 (diff) |
bonding: Use a per netns implementation of /sys/class/net/bonding_masters.
This fixes a network namespace misfeature that bonding_masters looked at
current instead of the remembering the context where in which
/sys/class/net/bonding_masters was opened in to see which network
namespace to act upon.
This removes the need for sysfs to handle tagged directories with
untagged members allowing for a conceptually simpler sysfs
implementation.
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bonding/bond_main.c')
-rw-r--r-- | drivers/net/bonding/bond_main.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 6191e633728..41430baa132 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -4888,6 +4888,7 @@ static int __net_init bond_net_init(struct net *net) INIT_LIST_HEAD(&bn->dev_list); bond_create_proc_dir(bn); + bond_create_sysfs(bn); return 0; } @@ -4896,6 +4897,7 @@ static void __net_exit bond_net_exit(struct net *net) { struct bond_net *bn = net_generic(net, bond_net_id); + bond_destroy_sysfs(bn); bond_destroy_proc_dir(bn); } @@ -4933,10 +4935,6 @@ static int __init bonding_init(void) goto err; } - res = bond_create_sysfs(); - if (res) - goto err; - register_netdevice_notifier(&bond_netdev_notifier); register_inetaddr_notifier(&bond_inetaddr_notifier); out: @@ -4954,7 +4952,6 @@ static void __exit bonding_exit(void) unregister_netdevice_notifier(&bond_netdev_notifier); unregister_inetaddr_notifier(&bond_inetaddr_notifier); - bond_destroy_sysfs(); bond_destroy_debugfs(); rtnl_link_unregister(&bond_link_ops); |