aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bonding/bond_sysfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/bonding/bond_sysfs.c')
-rw-r--r--drivers/net/bonding/bond_sysfs.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/net/bonding/bond_sysfs.c b/drivers/net/bonding/bond_sysfs.c
index ced9ed8f995a..8e317e115532 100644
--- a/drivers/net/bonding/bond_sysfs.c
+++ b/drivers/net/bonding/bond_sysfs.c
@@ -1372,6 +1372,21 @@ int bond_create_sysfs(void)
1372 return -ENODEV; 1372 return -ENODEV;
1373 1373
1374 ret = class_create_file(netdev_class, &class_attr_bonding_masters); 1374 ret = class_create_file(netdev_class, &class_attr_bonding_masters);
1375 /*
1376 * Permit multiple loads of the module by ignoring failures to
1377 * create the bonding_masters sysfs file. Bonding devices
1378 * created by second or subsequent loads of the module will
1379 * not be listed in, or controllable by, bonding_masters, but
1380 * will have the usual "bonding" sysfs directory.
1381 *
1382 * This is done to preserve backwards compatibility for
1383 * initscripts/sysconfig, which load bonding multiple times to
1384 * configure multiple bonding devices.
1385 */
1386 if (ret == -EEXIST) {
1387 netdev_class = NULL;
1388 return 0;
1389 }
1375 1390
1376 return ret; 1391 return ret;
1377 1392