From a9858d75258361197d20341c4f0cd0cb6031b14c Mon Sep 17 00:00:00 2001 From: Jay Vosburgh Date: Fri, 19 Jan 2007 18:15:47 -0800 Subject: [PATCH] --- yaml --- r: 46542 b: refs/heads/master c: 877cbd36b27e073eb78fe7073a433fbe0da7d5f8 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/net/bonding/bond_sysfs.c | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 50f3c9f8859f..85cfc8745229 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 09c892797688312dc8a3c4d8b37dcb7207c1d48a +refs/heads/master: 877cbd36b27e073eb78fe7073a433fbe0da7d5f8 diff --git a/trunk/drivers/net/bonding/bond_sysfs.c b/trunk/drivers/net/bonding/bond_sysfs.c index ced9ed8f995a..8e317e115532 100644 --- a/trunk/drivers/net/bonding/bond_sysfs.c +++ b/trunk/drivers/net/bonding/bond_sysfs.c @@ -1372,6 +1372,21 @@ int bond_create_sysfs(void) return -ENODEV; ret = class_create_file(netdev_class, &class_attr_bonding_masters); + /* + * Permit multiple loads of the module by ignoring failures to + * create the bonding_masters sysfs file. Bonding devices + * created by second or subsequent loads of the module will + * not be listed in, or controllable by, bonding_masters, but + * will have the usual "bonding" sysfs directory. + * + * This is done to preserve backwards compatibility for + * initscripts/sysconfig, which load bonding multiple times to + * configure multiple bonding devices. + */ + if (ret == -EEXIST) { + netdev_class = NULL; + return 0; + } return ret;