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/bonding.h | |
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/bonding.h')
-rw-r--r-- | drivers/net/bonding/bonding.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/bonding/bonding.h b/drivers/net/bonding/bonding.h index e82336615600..82fec5fc75d7 100644 --- a/drivers/net/bonding/bonding.h +++ b/drivers/net/bonding/bonding.h | |||
@@ -379,11 +379,13 @@ static inline bool bond_is_slave_inactive(struct slave *slave) | |||
379 | return slave->inactive; | 379 | return slave->inactive; |
380 | } | 380 | } |
381 | 381 | ||
382 | struct bond_net; | ||
383 | |||
382 | struct vlan_entry *bond_next_vlan(struct bonding *bond, struct vlan_entry *curr); | 384 | struct vlan_entry *bond_next_vlan(struct bonding *bond, struct vlan_entry *curr); |
383 | int bond_dev_queue_xmit(struct bonding *bond, struct sk_buff *skb, struct net_device *slave_dev); | 385 | int bond_dev_queue_xmit(struct bonding *bond, struct sk_buff *skb, struct net_device *slave_dev); |
384 | int bond_create(struct net *net, const char *name); | 386 | int bond_create(struct net *net, const char *name); |
385 | int bond_create_sysfs(void); | 387 | int bond_create_sysfs(struct bond_net *net); |
386 | void bond_destroy_sysfs(void); | 388 | void bond_destroy_sysfs(struct bond_net *net); |
387 | void bond_prepare_sysfs_group(struct bonding *bond); | 389 | void bond_prepare_sysfs_group(struct bonding *bond); |
388 | int bond_create_slave_symlinks(struct net_device *master, struct net_device *slave); | 390 | int bond_create_slave_symlinks(struct net_device *master, struct net_device *slave); |
389 | void bond_destroy_slave_symlinks(struct net_device *master, struct net_device *slave); | 391 | void bond_destroy_slave_symlinks(struct net_device *master, struct net_device *slave); |
@@ -409,6 +411,7 @@ struct bond_net { | |||
409 | #ifdef CONFIG_PROC_FS | 411 | #ifdef CONFIG_PROC_FS |
410 | struct proc_dir_entry * proc_dir; | 412 | struct proc_dir_entry * proc_dir; |
411 | #endif | 413 | #endif |
414 | struct class_attribute class_attr_bonding_masters; | ||
412 | }; | 415 | }; |
413 | 416 | ||
414 | #ifdef CONFIG_PROC_FS | 417 | #ifdef CONFIG_PROC_FS |