Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 108969
b: refs/heads/master
c: 77571f0
h: refs/heads/master
i:
  108967: ce05f87
v: v3
  • Loading branch information
Oliver Neukum authored and Greg Kroah-Hartman committed Aug 21, 2008
1 parent f44ff69 commit c3142d8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 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: f8033827d8e92db6159d34ed45c608522674ecd8
refs/heads/master: 77571f05a483c0259e42ba2f482c82debc9a63af
9 changes: 7 additions & 2 deletions trunk/drivers/usb/core/urb.c
Original file line number Diff line number Diff line change
Expand Up @@ -601,15 +601,20 @@ EXPORT_SYMBOL_GPL(usb_kill_anchored_urbs);
void usb_unlink_anchored_urbs(struct usb_anchor *anchor)
{
struct urb *victim;
unsigned long flags;

spin_lock_irq(&anchor->lock);
spin_lock_irqsave(&anchor->lock, flags);
while (!list_empty(&anchor->urb_list)) {
victim = list_entry(anchor->urb_list.prev, struct urb,
anchor_list);
usb_get_urb(victim);
spin_unlock_irqrestore(&anchor->lock, flags);
/* this will unanchor the URB */
usb_unlink_urb(victim);
usb_put_urb(victim);
spin_lock_irqsave(&anchor->lock, flags);
}
spin_unlock_irq(&anchor->lock);
spin_unlock_irqrestore(&anchor->lock, flags);
}
EXPORT_SYMBOL_GPL(usb_unlink_anchored_urbs);

Expand Down

0 comments on commit c3142d8

Please sign in to comment.