提交 49bd8fb0 编写于 作者: J Jiri Pirko 提交者: David S. Miller

netpoll: remove usage of dev->master

Signed-off-by: NJiri Pirko <jiri@resnulli.us>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 74fdd93f
...@@ -210,9 +210,12 @@ static void netpoll_poll_dev(struct net_device *dev) ...@@ -210,9 +210,12 @@ static void netpoll_poll_dev(struct net_device *dev)
if (dev->flags & IFF_SLAVE) { if (dev->flags & IFF_SLAVE) {
if (ni) { if (ni) {
struct net_device *bond_dev = dev->master; struct net_device *bond_dev;
struct sk_buff *skb; 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))) { while ((skb = skb_dequeue(&ni->arp_tx))) {
skb->dev = bond_dev; skb->dev = bond_dev;
skb_queue_tail(&bond_ni->arp_tx, skb); skb_queue_tail(&bond_ni->arp_tx, skb);
...@@ -815,7 +818,7 @@ int netpoll_setup(struct netpoll *np) ...@@ -815,7 +818,7 @@ int netpoll_setup(struct netpoll *np)
return -ENODEV; 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); np_err(np, "%s is a slave device, aborting\n", np->dev_name);
err = -EBUSY; err = -EBUSY;
goto put; goto put;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册