summaryrefslogtreecommitdiffstats
path: root/drivers/net/bonding/bond_main.c
diff options
context:
space:
mode:
authorEric W. Biederman2009-10-29 15:18:22 +0100
committerDavid S. Miller2009-10-30 20:41:19 +0100
commit6151b3d435feeeae7487032fcd5c8c7f281ba05c (patch)
tree0fa59fbfc8c7afb246870308dc742de931d926b3 /drivers/net/bonding/bond_main.c
parentnet: Allow devices to specify a device specific sysfs group. (diff)
downloadkernel-qcow2-linux-6151b3d435feeeae7487032fcd5c8c7f281ba05c.tar.gz
kernel-qcow2-linux-6151b3d435feeeae7487032fcd5c8c7f281ba05c.tar.xz
kernel-qcow2-linux-6151b3d435feeeae7487032fcd5c8c7f281ba05c.zip
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_main.c')
-rw-r--r--drivers/net/bonding/bond_main.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index db82876ceb28..a58a60859da9 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -2011,7 +2011,6 @@ static void bond_uninit(struct net_device *bond_dev)
struct bonding *bond = netdev_priv(bond_dev);
bond_deinit(bond_dev);
- bond_destroy_sysfs_entry(bond);
if (bond->wq)
destroy_workqueue(bond->wq);
@@ -3457,9 +3456,6 @@ static int bond_event_changename(struct bonding *bond)
bond_remove_proc_entry(bond);
bond_create_proc_entry(bond);
- bond_destroy_sysfs_entry(bond);
- bond_create_sysfs_entry(bond);
-
return NOTIFY_DONE;
}
@@ -5078,6 +5074,7 @@ static int bond_init(struct net_device *bond_dev)
bond_create_proc_entry(bond);
list_add_tail(&bond->bond_list, &bond_dev_list);
+ bond_prepare_sysfs_group(bond);
return 0;
}
@@ -5120,15 +5117,9 @@ int bond_create(const char *name)
if (res < 0)
goto out_bond;
- res = bond_create_sysfs_entry(netdev_priv(bond_dev));
- if (res < 0)
- goto out_unreg;
-
rtnl_unlock();
return 0;
-out_unreg:
- unregister_netdevice(bond_dev);
out_bond:
bond_deinit(bond_dev);
out_netdev: