diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2011-10-12 17:56:25 -0400 |
---|---|---|
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 6191e6337284..41430baa1321 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) | |||
4888 | INIT_LIST_HEAD(&bn->dev_list); | 4888 | INIT_LIST_HEAD(&bn->dev_list); |
4889 | 4889 | ||
4890 | bond_create_proc_dir(bn); | 4890 | bond_create_proc_dir(bn); |
4891 | bond_create_sysfs(bn); | ||
4891 | 4892 | ||
4892 | return 0; | 4893 | return 0; |
4893 | } | 4894 | } |
@@ -4896,6 +4897,7 @@ static void __net_exit bond_net_exit(struct net *net) | |||
4896 | { | 4897 | { |
4897 | struct bond_net *bn = net_generic(net, bond_net_id); | 4898 | struct bond_net *bn = net_generic(net, bond_net_id); |
4898 | 4899 | ||
4900 | bond_destroy_sysfs(bn); | ||
4899 | bond_destroy_proc_dir(bn); | 4901 | bond_destroy_proc_dir(bn); |
4900 | } | 4902 | } |
4901 | 4903 | ||
@@ -4933,10 +4935,6 @@ static int __init bonding_init(void) | |||
4933 | goto err; | 4935 | goto err; |
4934 | } | 4936 | } |
4935 | 4937 | ||
4936 | res = bond_create_sysfs(); | ||
4937 | if (res) | ||
4938 | goto err; | ||
4939 | |||
4940 | register_netdevice_notifier(&bond_netdev_notifier); | 4938 | register_netdevice_notifier(&bond_netdev_notifier); |
4941 | register_inetaddr_notifier(&bond_inetaddr_notifier); | 4939 | register_inetaddr_notifier(&bond_inetaddr_notifier); |
4942 | out: | 4940 | out: |
@@ -4954,7 +4952,6 @@ static void __exit bonding_exit(void) | |||
4954 | unregister_netdevice_notifier(&bond_netdev_notifier); | 4952 | unregister_netdevice_notifier(&bond_netdev_notifier); |
4955 | unregister_inetaddr_notifier(&bond_inetaddr_notifier); | 4953 | unregister_inetaddr_notifier(&bond_inetaddr_notifier); |
4956 | 4954 | ||
4957 | bond_destroy_sysfs(); | ||
4958 | bond_destroy_debugfs(); | 4955 | bond_destroy_debugfs(); |
4959 | 4956 | ||
4960 | rtnl_link_unregister(&bond_link_ops); | 4957 | rtnl_link_unregister(&bond_link_ops); |