From 14056e7930761b730e2b34ae716e151ba890f3bf Mon Sep 17 00:00:00 2001 From: Veaceslav Falico Date: Wed, 16 Jul 2014 18:32:01 +0200 Subject: [PATCH] bonding: use rtnl_deref in bond_change_rx_flags() As it's always called with RTNL held, via dev_set_allmulti/promiscuity. Also, remove the wrong comment. CC: Jay Vosburgh CC: Andy Gospodarek Signed-off-by: Veaceslav Falico Acked-by: Eric Dumazet Signed-off-by: David S. Miller --- drivers/net/bonding/bond_main.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index a2c4e8d4a955..5e5b3b30c51c 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -496,9 +496,8 @@ static int bond_set_promiscuity(struct bonding *bond, int inc) int err = 0; if (bond_uses_primary(bond)) { - struct slave *curr_active = bond_deref_active_protected(bond); + struct slave *curr_active = rtnl_dereference(bond->curr_active_slave); - /* write lock already acquired */ if (curr_active) err = dev_set_promiscuity(curr_active->dev, inc); } else { @@ -522,9 +521,8 @@ static int bond_set_allmulti(struct bonding *bond, int inc) int err = 0; if (bond_uses_primary(bond)) { - struct slave *curr_active = bond_deref_active_protected(bond); + struct slave *curr_active = rtnl_dereference(bond->curr_active_slave); - /* write lock already acquired */ if (curr_active) err = dev_set_allmulti(curr_active->dev, inc); } else { -- 2.39.5