Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 335965
b: refs/heads/master
c: 893d290
h: refs/heads/master
i:
  335963: 2b70efa
v: v3
  • Loading branch information
Roland Dreier authored and Jens Axboe committed Nov 23, 2012
1 parent e71d7a4 commit 51c7e87
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 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: 836413e8c78ecbc55aa31f3cb600f8ee1aa355a2
refs/heads/master: 893d290f1d7496db97c9471bc352ad4a11dc8a25
8 changes: 7 additions & 1 deletion trunk/block/blk-exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,17 @@ void blk_execute_rq_nowait(struct request_queue *q, struct gendisk *bd_disk,
rq_end_io_fn *done)
{
int where = at_head ? ELEVATOR_INSERT_FRONT : ELEVATOR_INSERT_BACK;
bool is_pm_resume;

WARN_ON(irqs_disabled());

rq->rq_disk = bd_disk;
rq->end_io = done;
/*
* need to check this before __blk_run_queue(), because rq can
* be freed before that returns.
*/
is_pm_resume = rq->cmd_type == REQ_TYPE_PM_RESUME;

spin_lock_irq(q->queue_lock);

Expand All @@ -71,7 +77,7 @@ void blk_execute_rq_nowait(struct request_queue *q, struct gendisk *bd_disk,
__elv_add_request(q, rq, where);
__blk_run_queue(q);
/* the queue is stopped so it won't be run */
if (rq->cmd_type == REQ_TYPE_PM_RESUME)
if (is_pm_resume)
q->request_fn(q);
spin_unlock_irq(q->queue_lock);
}
Expand Down

0 comments on commit 51c7e87

Please sign in to comment.