From 4078c4f94cf46f6ca555164cea74f270bcb383c9 Mon Sep 17 00:00:00 2001 From: Jay Vosburgh Date: Tue, 6 Nov 2007 13:33:28 -0800 Subject: [PATCH] --- yaml --- r: 73460 b: refs/heads/master c: 1466a21997212a5fb33d5da9357841972b28b007 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/net/bonding/bond_sysfs.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index acdea05cebd9..bb500f636c06 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a5e68c02fe4d8dff2ff3c5212f9f67082849cc4b +refs/heads/master: 1466a21997212a5fb33d5da9357841972b28b007 diff --git a/trunk/drivers/net/bonding/bond_sysfs.c b/trunk/drivers/net/bonding/bond_sysfs.c index 7a06ade85b02..b29330d8e309 100644 --- a/trunk/drivers/net/bonding/bond_sysfs.c +++ b/trunk/drivers/net/bonding/bond_sysfs.c @@ -1193,8 +1193,6 @@ static ssize_t bonding_show_active_slave(struct device *d, struct bonding *bond = to_bond(d); int count; - rtnl_lock(); - read_lock(&bond->curr_slave_lock); curr = bond->curr_active_slave; read_unlock(&bond->curr_slave_lock); @@ -1216,7 +1214,9 @@ static ssize_t bonding_store_active_slave(struct device *d, struct slave *new_active = NULL; struct bonding *bond = to_bond(d); + rtnl_lock(); write_lock_bh(&bond->lock); + if (!USES_PRIMARY(bond->params.mode)) { printk(KERN_INFO DRV_NAME ": %s: Unable to change active slave; %s is in mode %d\n",