Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 111764
b: refs/heads/master
c: ca330c5
h: refs/heads/master
v: v3
  • Loading branch information
Ming Lei authored and David S. Miller committed Sep 23, 2008
1 parent ace7fdb commit 0bfe8b5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d48abfecea8513cfd2fd7e341439c1b8a28e9ff4
refs/heads/master: ca330c5a913a9b1690c709f4cfcd6be0c8696b14
10 changes: 5 additions & 5 deletions trunk/drivers/bluetooth/hci_usb.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,17 +70,17 @@ static inline void _urb_queue_head(struct _urb_queue *q, struct _urb *_urb)
{
unsigned long flags;
spin_lock_irqsave(&q->lock, flags);
/* _urb_unlink needs to know which spinlock to use, thus mb(). */
_urb->queue = q; mb(); list_add(&_urb->list, &q->head);
/* _urb_unlink needs to know which spinlock to use, thus smp_mb(). */
_urb->queue = q; smp_mb(); list_add(&_urb->list, &q->head);
spin_unlock_irqrestore(&q->lock, flags);
}

static inline void _urb_queue_tail(struct _urb_queue *q, struct _urb *_urb)
{
unsigned long flags;
spin_lock_irqsave(&q->lock, flags);
/* _urb_unlink needs to know which spinlock to use, thus mb(). */
_urb->queue = q; mb(); list_add_tail(&_urb->list, &q->head);
/* _urb_unlink needs to know which spinlock to use, thus smp_mb(). */
_urb->queue = q; smp_mb(); list_add_tail(&_urb->list, &q->head);
spin_unlock_irqrestore(&q->lock, flags);
}

Expand All @@ -89,7 +89,7 @@ static inline void _urb_unlink(struct _urb *_urb)
struct _urb_queue *q;
unsigned long flags;

mb();
smp_mb();
q = _urb->queue;
/* If q is NULL, it will die at easy-to-debug NULL pointer dereference.
No need to BUG(). */
Expand Down

0 comments on commit 0bfe8b5

Please sign in to comment.