Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 316791
b: refs/heads/master
c: e81ca6f
h: refs/heads/master
i:
  316789: ab70d44
  316787: a0464d2
  316783: 6aba60d
v: v3
  • Loading branch information
Muthukumar Ratty authored and James Bottomley committed Jul 20, 2012
1 parent f7f99d6 commit 589f4c0
Show file tree
Hide file tree
Showing 2 changed files with 9 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: 6548b0e5b875a07e32e924b22a7df3669892c75a
refs/heads/master: e81ca6fe85b77109a32489a5db82f575d51dfc98
11 changes: 8 additions & 3 deletions trunk/block/blk-exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ static void blk_end_sync_rq(struct request *rq, int error)
* Description:
* Insert a fully prepared request at the back of the I/O scheduler queue
* for execution. Don't wait for completion.
*
* Note:
* This function will invoke @done directly if the queue is dead.
*/
void blk_execute_rq_nowait(struct request_queue *q, struct gendisk *bd_disk,
struct request *rq, int at_head,
Expand All @@ -51,18 +54,20 @@ void blk_execute_rq_nowait(struct request_queue *q, struct gendisk *bd_disk,
int where = at_head ? ELEVATOR_INSERT_FRONT : ELEVATOR_INSERT_BACK;

WARN_ON(irqs_disabled());

rq->rq_disk = bd_disk;
rq->end_io = done;

spin_lock_irq(q->queue_lock);

if (unlikely(blk_queue_dead(q))) {
spin_unlock_irq(q->queue_lock);
rq->errors = -ENXIO;
if (rq->end_io)
rq->end_io(rq, rq->errors);
spin_unlock_irq(q->queue_lock);
return;
}

rq->rq_disk = bd_disk;
rq->end_io = done;
__elv_add_request(q, rq, where);
__blk_run_queue(q);
/* the queue is stopped so it won't be run */
Expand Down

0 comments on commit 589f4c0

Please sign in to comment.