aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bonding/bond_main.c
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2010-10-28 21:52:46 -0400
committerDavid S. Miller <davem@davemloft.net>2010-11-08 16:50:07 -0500
commite4a7b93bd5d84e1e79917d024d17d745d190fc9a (patch)
tree84a80b1b60ca952498a6e8e5587256a5bb8d54cf /drivers/net/bonding/bond_main.c
parent840a185dddfd098b78b96a30da4cad722a7aef18 (diff)
bonding: remove dev_base_lock use
bond_info_seq_start() uses a read_lock(&dev_base_lock) to make sure device doesn’t disappear. Same goal can be achieved using RCU. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/bonding/bond_main.c')
-rw-r--r--drivers/net/bonding/bond_main.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
index bdb68a600382..518844852f06 100644
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -3209,7 +3209,7 @@ out:
3209#ifdef CONFIG_PROC_FS 3209#ifdef CONFIG_PROC_FS
3210 3210
3211static void *bond_info_seq_start(struct seq_file *seq, loff_t *pos) 3211static void *bond_info_seq_start(struct seq_file *seq, loff_t *pos)
3212 __acquires(&dev_base_lock) 3212 __acquires(RCU)
3213 __acquires(&bond->lock) 3213 __acquires(&bond->lock)
3214{ 3214{
3215 struct bonding *bond = seq->private; 3215 struct bonding *bond = seq->private;
@@ -3218,7 +3218,7 @@ static void *bond_info_seq_start(struct seq_file *seq, loff_t *pos)
3218 int i; 3218 int i;
3219 3219
3220 /* make sure the bond won't be taken away */ 3220 /* make sure the bond won't be taken away */
3221 read_lock(&dev_base_lock); 3221 rcu_read_lock();
3222 read_lock(&bond->lock); 3222 read_lock(&bond->lock);
3223 3223
3224 if (*pos == 0) 3224 if (*pos == 0)
@@ -3248,12 +3248,12 @@ static void *bond_info_seq_next(struct seq_file *seq, void *v, loff_t *pos)
3248 3248
3249static void bond_info_seq_stop(struct seq_file *seq, void *v) 3249static void bond_info_seq_stop(struct seq_file *seq, void *v)
3250 __releases(&bond->lock) 3250 __releases(&bond->lock)
3251 __releases(&dev_base_lock) 3251 __releases(RCU)
3252{ 3252{
3253 struct bonding *bond = seq->private; 3253 struct bonding *bond = seq->private;
3254 3254
3255 read_unlock(&bond->lock); 3255 read_unlock(&bond->lock);
3256 read_unlock(&dev_base_lock); 3256 rcu_read_unlock();
3257} 3257}
3258 3258
3259static void bond_info_show_master(struct seq_file *seq) 3259static void bond_info_show_master(struct seq_file *seq)