kernel-ark/drivers/net/bonding
Jay Vosburgh 877cbd36b2 bonding: modify sysfs support to permit multiple loads
The existing code would blindly attempt to create the
bonding_masters file (in /sys/class/net) every time the module was
loaded.  When the module is loaded multiple times (which is the
historical method used by initscripts and sysconfig to create multiple
bonding interfaces), this caused load failure of the second module load
attempt, as the creation request would fail.

	This changes the code to note the failure, arrange to not remove
the bonding_masters file upon module exit, and then return success.

	Bonding interfaces created by the second or subsequent loads of
the module will not exist in bonding_masters.  This is not a significant
change, as previously only the interfaces from the most recent load of
the module would be listed.  Both situations are less than optimal, but
this case permits compatibility with existing distro configuration
scripts, and is consistent.

	Note that previously, the sysfs create request would overwrite
the exsting bonding_masters file and succeed, allowing multiple loads of
the module.  The sysfs code has recently changed to return an error if
the file being created already exists.

	Patrick McHardy <kaber@trash.net>, who reported this problem,
observed crashes on the old kernel (before sysfs checked for
duplicates).  I did not experience such crashes, but this change should
resolve them.

Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-02-05 16:58:47 -05:00
..
bond_3ad.c
bond_3ad.h
bond_alb.c [PATCH] bonding: fix deadlock on high loads in bond_alb_monitor() 2006-10-05 07:01:25 -04:00
bond_alb.h
bond_main.c bonding: fix error check in sysfs creation 2007-02-05 16:58:47 -05:00
bond_sysfs.c bonding: modify sysfs support to permit multiple loads 2007-02-05 16:58:47 -05:00
bonding.h bonding.h: "extern inline" -> "static inline" 2007-02-05 16:58:47 -05:00
Makefile