[PATCH] bonding: fix multiple module load problem

Stephen Hemminger
2009-06-10T06:08:22Z

Some users still load bond module multiple times to create bonding
devices. This accidentally was broken by a later patch about
the time sysfs was fixed. According to Jay, it was broken
by:
commit b8a9787eddb0e4665f31dd1d64584732b2b5d051
Author: Jay Vosburgh <fubar@us.ibm.com>
Date: Fri Jun 13 18:12:04 2008 -0700

bonding: Allow setting max_bonds to zero

Note: sysfs and procfs still produce WARN() messages when this is done
so the sysfs method is the recommended API.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>

---
Since 2.6.30 is now out this needs to goto the first stable 2.6.30.1
tree.

--- a/drivers/net/bonding/bond_sysfs.c 2009-06-09 10:07:29.618979856 -0700
+++ b/drivers/net/bonding/bond_sysfs.c 2009-06-09 10:18:04.039973238 -0700
@@ -1538,6 +1538,7 @@ int bond_create_sysfs(void)
printk(KERN_ERR
"network device named %s already exists in sysfs",
class_attr_bonding_masters.attr.name);
+ ret = 0;
}

return ret;