diff options
| author | Thomas Gleixner <tglx@linutronix.de> | 2010-10-12 11:27:20 -0400 |
|---|---|---|
| committer | Thomas Gleixner <tglx@linutronix.de> | 2010-10-12 11:27:28 -0400 |
| commit | 37eca0d64a2dbeece25969ec0698e1ff72bdcf39 (patch) | |
| tree | 54ba70f0428f586f4fe28d8b429b9f9e0799a17a /include/linux/netpoll.h | |
| parent | 277b199800ac90811ac86d215063df1984f51619 (diff) | |
| parent | 3c06806e690885ce978ef180c8f8b6f8c17fb4b4 (diff) | |
Merge branch 'linus' into core/locking
Reason: Pull in the semaphore related changes
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/linux/netpoll.h')
| -rw-r--r-- | include/linux/netpoll.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/linux/netpoll.h b/include/linux/netpoll.h index 791d5109f34c..50d8009be86c 100644 --- a/include/linux/netpoll.h +++ b/include/linux/netpoll.h | |||
| @@ -63,20 +63,20 @@ static inline bool netpoll_rx(struct sk_buff *skb) | |||
| 63 | unsigned long flags; | 63 | unsigned long flags; |
| 64 | bool ret = false; | 64 | bool ret = false; |
| 65 | 65 | ||
| 66 | rcu_read_lock_bh(); | 66 | local_irq_save(flags); |
| 67 | npinfo = rcu_dereference_bh(skb->dev->npinfo); | 67 | npinfo = rcu_dereference_bh(skb->dev->npinfo); |
| 68 | 68 | ||
| 69 | if (!npinfo || (list_empty(&npinfo->rx_np) && !npinfo->rx_flags)) | 69 | if (!npinfo || (list_empty(&npinfo->rx_np) && !npinfo->rx_flags)) |
| 70 | goto out; | 70 | goto out; |
| 71 | 71 | ||
| 72 | spin_lock_irqsave(&npinfo->rx_lock, flags); | 72 | spin_lock(&npinfo->rx_lock); |
| 73 | /* check rx_flags again with the lock held */ | 73 | /* check rx_flags again with the lock held */ |
| 74 | if (npinfo->rx_flags && __netpoll_rx(skb)) | 74 | if (npinfo->rx_flags && __netpoll_rx(skb)) |
| 75 | ret = true; | 75 | ret = true; |
| 76 | spin_unlock_irqrestore(&npinfo->rx_lock, flags); | 76 | spin_unlock(&npinfo->rx_lock); |
| 77 | 77 | ||
| 78 | out: | 78 | out: |
| 79 | rcu_read_unlock_bh(); | 79 | local_irq_restore(flags); |
| 80 | return ret; | 80 | return ret; |
| 81 | } | 81 | } |
| 82 | 82 | ||
