Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 254002
b: refs/heads/master
c: a9dce2a
h: refs/heads/master
v: v3
  • Loading branch information
Tejun Heo authored and Jens Axboe committed Jun 9, 2011
1 parent 5cef8bd commit 5b308ec
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 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: ab4bd22d3cce6977dc039664cc2d052e3147d662
refs/heads/master: a9dce2a3b4f0686dd66cb44d4826a59508bce969
14 changes: 11 additions & 3 deletions trunk/block/genhd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1508,10 +1508,18 @@ void disk_unblock_events(struct gendisk *disk)
*/
void disk_check_events(struct gendisk *disk)
{
if (disk->ev) {
__disk_block_events(disk, false);
__disk_unblock_events(disk, true);
struct disk_events *ev = disk->ev;
unsigned long flags;

if (!ev)
return;

spin_lock_irqsave(&ev->lock, flags);
if (!ev->block) {
cancel_delayed_work(&ev->dwork);
queue_delayed_work(system_nrt_wq, &ev->dwork, 0);
}
spin_unlock_irqrestore(&ev->lock, flags);
}
EXPORT_SYMBOL_GPL(disk_check_events);

Expand Down

0 comments on commit 5b308ec

Please sign in to comment.