diff options
Diffstat (limited to 'net/core/dev.c')
-rw-r--r-- | net/core/dev.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index 52a3bf7ae177..faf59b02c4bf 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -1696,7 +1696,8 @@ static void net_rx_action(struct softirq_action *h) | |||
1696 | struct softnet_data *queue = &__get_cpu_var(softnet_data); | 1696 | struct softnet_data *queue = &__get_cpu_var(softnet_data); |
1697 | unsigned long start_time = jiffies; | 1697 | unsigned long start_time = jiffies; |
1698 | int budget = netdev_budget; | 1698 | int budget = netdev_budget; |
1699 | 1699 | void *have; | |
1700 | |||
1700 | local_irq_disable(); | 1701 | local_irq_disable(); |
1701 | 1702 | ||
1702 | while (!list_empty(&queue->poll_list)) { | 1703 | while (!list_empty(&queue->poll_list)) { |
@@ -1709,10 +1710,10 @@ static void net_rx_action(struct softirq_action *h) | |||
1709 | 1710 | ||
1710 | dev = list_entry(queue->poll_list.next, | 1711 | dev = list_entry(queue->poll_list.next, |
1711 | struct net_device, poll_list); | 1712 | struct net_device, poll_list); |
1712 | netpoll_poll_lock(dev); | 1713 | have = netpoll_poll_lock(dev); |
1713 | 1714 | ||
1714 | if (dev->quota <= 0 || dev->poll(dev, &budget)) { | 1715 | if (dev->quota <= 0 || dev->poll(dev, &budget)) { |
1715 | netpoll_poll_unlock(dev); | 1716 | netpoll_poll_unlock(have); |
1716 | local_irq_disable(); | 1717 | local_irq_disable(); |
1717 | list_del(&dev->poll_list); | 1718 | list_del(&dev->poll_list); |
1718 | list_add_tail(&dev->poll_list, &queue->poll_list); | 1719 | list_add_tail(&dev->poll_list, &queue->poll_list); |
@@ -1721,7 +1722,7 @@ static void net_rx_action(struct softirq_action *h) | |||
1721 | else | 1722 | else |
1722 | dev->quota = dev->weight; | 1723 | dev->quota = dev->weight; |
1723 | } else { | 1724 | } else { |
1724 | netpoll_poll_unlock(dev); | 1725 | netpoll_poll_unlock(have); |
1725 | dev_put(dev); | 1726 | dev_put(dev); |
1726 | local_irq_disable(); | 1727 | local_irq_disable(); |
1727 | } | 1728 | } |