diff options
author | Jiri Pirko <jiri@resnulli.us> | 2013-01-03 22:48:55 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-01-04 21:31:50 (GMT) |
commit | 49bd8fb0b18944fc0b6b11d999619d3687c3914a (patch) | |
tree | b3a25e93209b1385d0d6c18451b213404bb4fcab | |
parent | 74fdd93fbcc16522406f65c564ea104490ad4908 (diff) | |
download | linux-49bd8fb0b18944fc0b6b11d999619d3687c3914a.tar.xz |
netpoll: remove usage of dev->master
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/core/netpoll.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/net/core/netpoll.c b/net/core/netpoll.c index 3151acf..d2bda8e 100644 --- a/net/core/netpoll.c +++ b/net/core/netpoll.c @@ -210,9 +210,12 @@ static void netpoll_poll_dev(struct net_device *dev) if (dev->flags & IFF_SLAVE) { if (ni) { - struct net_device *bond_dev = dev->master; + struct net_device *bond_dev; struct sk_buff *skb; - struct netpoll_info *bond_ni = rcu_dereference_bh(bond_dev->npinfo); + struct netpoll_info *bond_ni; + + bond_dev = netdev_master_upper_dev_get_rcu(dev); + bond_ni = rcu_dereference_bh(bond_dev->npinfo); while ((skb = skb_dequeue(&ni->arp_tx))) { skb->dev = bond_dev; skb_queue_tail(&bond_ni->arp_tx, skb); @@ -815,7 +818,7 @@ int netpoll_setup(struct netpoll *np) return -ENODEV; } - if (ndev->master) { + if (netdev_master_upper_dev_get(ndev)) { np_err(np, "%s is a slave device, aborting\n", np->dev_name); err = -EBUSY; goto put; |