提交 14056e79 编写于 作者: V Veaceslav Falico 提交者: David S. Miller

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 <j.vosburgh@gmail.com>
CC: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: NVeaceslav Falico <vfalico@gmail.com>
Acked-by: NEric Dumazet <edumazet@google.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 c104178d
......@@ -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 {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册