aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bonding/bond_sysfs.c
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@aristanetworks.com>2009-10-29 14:18:22 +0000
committerDavid S. Miller <davem@davemloft.net>2009-10-30 12:41:19 -0700
commit6151b3d435feeeae7487032fcd5c8c7f281ba05c (patch)
tree0fa59fbfc8c7afb246870308dc742de931d926b3 /drivers/net/bonding/bond_sysfs.c
parent0c509a6c9393b27a8c5a01acd4a72616206cfc24 (diff)
downloadkernel_samsung_smdk4412-6151b3d435feeeae7487032fcd5c8c7f281ba05c.zip
kernel_samsung_smdk4412-6151b3d435feeeae7487032fcd5c8c7f281ba05c.tar.gz
kernel_samsung_smdk4412-6151b3d435feeeae7487032fcd5c8c7f281ba05c.tar.bz2
bond: Simply bond sysfs group creation
This patch delegates the work of creating the sysfs groups to the netdev layer and ultimately to the device layer. This closes races between uevents. Signed-off-by: Eric W. Biederman <ebiederm@aristanetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bonding/bond_sysfs.c')
-rw-r--r--drivers/net/bonding/bond_sysfs.c20
1 files changed, 2 insertions, 18 deletions
diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c
index dca7d82..f924a0b 100644
--- a/drivers/net/bonding/bond_sysfs.c
+++ b/drivers/net/bonding/bond_sysfs.c
@@ -1616,24 +1616,8 @@ void bond_destroy_sysfs(void)
* Initialize sysfs for each bond. This sets up and registers
* the 'bondctl' directory for each individual bond under /sys/class/net.
*/
-int bond_create_sysfs_entry(struct bonding *bond)
+void bond_prepare_sysfs_group(struct bonding *bond)
{
- struct net_device *dev = bond->dev;
- int err;
-
- err = sysfs_create_group(&(dev->dev.kobj), &bonding_group);
- if (err)
- pr_emerg("eek! didn't create group!\n");
-
- return err;
-}
-/*
- * Remove sysfs entries for each bond.
- */
-void bond_destroy_sysfs_entry(struct bonding *bond)
-{
- struct net_device *dev = bond->dev;
-
- sysfs_remove_group(&(dev->dev.kobj), &bonding_group);
+ bond->dev->sysfs_groups[0] = &bonding_group;
}