Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 370077
b: refs/heads/master
c: c08c464
h: refs/heads/master
i:
  370075: 5300ccc
v: v3
  • Loading branch information
Al Viro committed Apr 29, 2013
1 parent 4e7bd03 commit e7a81f5
Show file tree
Hide file tree
Showing 2 changed files with 13 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: 03feee373f05d5c500dd6198015de83005df902c
refs/heads/master: c08c464d6f4136d9e48ffa23c0bcd93442343b2a
14 changes: 12 additions & 2 deletions trunk/drivers/isdn/mISDN/timerdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,24 @@ static int
mISDN_close(struct inode *ino, struct file *filep)
{
struct mISDNtimerdev *dev = filep->private_data;
struct list_head *list = &dev->pending;
struct mISDNtimer *timer, *next;

if (*debug & DEBUG_TIMER)
printk(KERN_DEBUG "%s(%p,%p)\n", __func__, ino, filep);
list_for_each_entry_safe(timer, next, &dev->pending, list) {
del_timer(&timer->tl);

spin_lock_irq(&dev->lock);
while (!list_empty(list)) {
timer = list_first_entry(list, struct mISDNtimer, list);
spin_unlock_irq(&dev->lock);
del_timer_sync(&timer->tl);
spin_lock_irq(&dev->lock);
/* it might have been moved to ->expired */
list_del(&timer->list);
kfree(timer);
}
spin_unlock_irq(&dev->lock);

list_for_each_entry_safe(timer, next, &dev->expired, list) {
kfree(timer);
}
Expand Down

0 comments on commit e7a81f5

Please sign in to comment.