diff options
author | David S. Miller <davem@davemloft.net> | 2012-08-22 17:21:38 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-08-22 17:21:38 -0400 |
commit | 1304a7343b30fc4f16045412efdbb4179a3d9255 (patch) | |
tree | 83d667ac4f62e30f70305ce4cc7e030e3465f92e /drivers/net/bonding | |
parent | 1d76efe1577b4323609b1bcbfafa8b731eda071a (diff) | |
parent | 23dcfa61bac244e1200ff9ad19c6e9144dcb6bb5 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'drivers/net/bonding')
-rw-r--r-- | drivers/net/bonding/bond_main.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index d95fbc34b229..a86174c9fed1 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c | |||
@@ -398,7 +398,7 @@ int bond_dev_queue_xmit(struct bonding *bond, struct sk_buff *skb, | |||
398 | sizeof(qdisc_skb_cb(skb)->slave_dev_queue_mapping)); | 398 | sizeof(qdisc_skb_cb(skb)->slave_dev_queue_mapping)); |
399 | skb->queue_mapping = qdisc_skb_cb(skb)->slave_dev_queue_mapping; | 399 | skb->queue_mapping = qdisc_skb_cb(skb)->slave_dev_queue_mapping; |
400 | 400 | ||
401 | if (unlikely(netpoll_tx_running(slave_dev))) | 401 | if (unlikely(netpoll_tx_running(bond->dev))) |
402 | bond_netpoll_send_skb(bond_get_slave_by_dev(bond, slave_dev), skb); | 402 | bond_netpoll_send_skb(bond_get_slave_by_dev(bond, slave_dev), skb); |
403 | else | 403 | else |
404 | dev_queue_xmit(skb); | 404 | dev_queue_xmit(skb); |
@@ -1235,12 +1235,12 @@ static inline int slave_enable_netpoll(struct slave *slave) | |||
1235 | struct netpoll *np; | 1235 | struct netpoll *np; |
1236 | int err = 0; | 1236 | int err = 0; |
1237 | 1237 | ||
1238 | np = kzalloc(sizeof(*np), GFP_KERNEL); | 1238 | np = kzalloc(sizeof(*np), GFP_ATOMIC); |
1239 | err = -ENOMEM; | 1239 | err = -ENOMEM; |
1240 | if (!np) | 1240 | if (!np) |
1241 | goto out; | 1241 | goto out; |
1242 | 1242 | ||
1243 | err = __netpoll_setup(np, slave->dev); | 1243 | err = __netpoll_setup(np, slave->dev, GFP_ATOMIC); |
1244 | if (err) { | 1244 | if (err) { |
1245 | kfree(np); | 1245 | kfree(np); |
1246 | goto out; | 1246 | goto out; |
@@ -1257,9 +1257,7 @@ static inline void slave_disable_netpoll(struct slave *slave) | |||
1257 | return; | 1257 | return; |
1258 | 1258 | ||
1259 | slave->np = NULL; | 1259 | slave->np = NULL; |
1260 | synchronize_rcu_bh(); | 1260 | __netpoll_free_rcu(np); |
1261 | __netpoll_cleanup(np); | ||
1262 | kfree(np); | ||
1263 | } | 1261 | } |
1264 | static inline bool slave_dev_support_netpoll(struct net_device *slave_dev) | 1262 | static inline bool slave_dev_support_netpoll(struct net_device *slave_dev) |
1265 | { | 1263 | { |
@@ -1292,7 +1290,7 @@ static void bond_netpoll_cleanup(struct net_device *bond_dev) | |||
1292 | read_unlock(&bond->lock); | 1290 | read_unlock(&bond->lock); |
1293 | } | 1291 | } |
1294 | 1292 | ||
1295 | static int bond_netpoll_setup(struct net_device *dev, struct netpoll_info *ni) | 1293 | static int bond_netpoll_setup(struct net_device *dev, struct netpoll_info *ni, gfp_t gfp) |
1296 | { | 1294 | { |
1297 | struct bonding *bond = netdev_priv(dev); | 1295 | struct bonding *bond = netdev_priv(dev); |
1298 | struct slave *slave; | 1296 | struct slave *slave; |