[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1357129716-2450-8-git-send-email-jiri@resnulli.us>
Date: Wed, 2 Jan 2013 13:28:28 +0100
From: Jiri Pirko <jiri@...nulli.us>
To: netdev@...r.kernel.org
Cc: davem@...emloft.net, edumazet@...gle.com, faisal.latif@...el.com,
roland@...nel.org, sean.hefty@...el.com, hal.rosenstock@...il.com,
fubar@...ibm.com, andy@...yhouse.net, divy@...lsio.com,
jitendra.kalsaria@...gic.com, sony.chacko@...gic.com,
linux-driver@...gic.com, kaber@...sh.net, ursula.braun@...ibm.com,
blaschka@...ux.vnet.ibm.com, linux390@...ibm.com,
shemminger@...tta.com, bhutchings@...arflare.com,
therbert@...gle.com, xiyou.wangcong@...il.com, joe@...ches.com,
gregory.v.rose@...el.com, john.r.fastabend@...el.com,
linux-rdma@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-s390@...r.kernel.org, bridge@...ts.linux-foundation.org,
fbl@...hat.com
Subject: [patch net-next V5 07/15] netpoll: remove usage of dev->master
Signed-off-by: Jiri Pirko <jiri@...nulli.us>
---
net/core/netpoll.c | 9 ++++++---
1 file 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;
--
1.8.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists