summaryrefslogtreecommitdiff
path: root/drivers/net/bonding/bond_procfs.c
diff options
context:
space:
mode:
authorVeaceslav Falico <vfalico@redhat.com>2013-09-25 09:20:14 +0200
committerDavid S. Miller <davem@davemloft.net>2013-09-26 16:02:05 -0400
commit9caff1e7b761c28018bf1858f6661439b4055f51 (patch)
treef68f67537234e09d2b7a033573de4649c92865af /drivers/net/bonding/bond_procfs.c
parent81f23b13ac985e9a3cfb889c690695a8932e02c2 (diff)
bonding: make bond_for_each_slave() use lower neighbour's private
It needs a list_head *iter, so add it wherever needed. Use both non-rcu and rcu variants. CC: Jay Vosburgh <fubar@us.ibm.com> CC: Andy Gospodarek <andy@greyhouse.net> CC: Dimitris Michailidis <dm@chelsio.com> Signed-off-by: Veaceslav Falico <vfalico@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bonding/bond_procfs.c')
-rw-r--r--drivers/net/bonding/bond_procfs.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/bonding/bond_procfs.c b/drivers/net/bonding/bond_procfs.c
index 20a6ee25bb63..7af5646e4410 100644
--- a/drivers/net/bonding/bond_procfs.c
+++ b/drivers/net/bonding/bond_procfs.c
@@ -10,8 +10,9 @@ static void *bond_info_seq_start(struct seq_file *seq, loff_t *pos)
__acquires(&bond->lock)
{
struct bonding *bond = seq->private;
- loff_t off = 0;
+ struct list_head *iter;
struct slave *slave;
+ loff_t off = 0;
/* make sure the bond won't be taken away */
rcu_read_lock();
@@ -20,7 +21,7 @@ static void *bond_info_seq_start(struct seq_file *seq, loff_t *pos)
if (*pos == 0)
return SEQ_START_TOKEN;
- bond_for_each_slave(bond, slave)
+ bond_for_each_slave(bond, slave, iter)
if (++off == *pos)
return slave;