Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 273815
b: refs/heads/master
c: 6dd9ad7
h: refs/heads/master
i:
  273813: f0ceca1
  273811: f371116
  273807: f78d240
v: v3
  • Loading branch information
Tejun Heo authored and Jens Axboe committed Nov 3, 2011
1 parent f506764 commit 8b293a2
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: 334c2b0b8b2ab186fa198413386cba41fffcb4f2
refs/heads/master: 6dd9ad7df2019b1e33a372a501907db293ebcd0d
9 changes: 7 additions & 2 deletions trunk/block/blk-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -407,8 +407,13 @@ void blk_cleanup_queue(struct request_queue *q)
spin_unlock_irq(lock);
mutex_unlock(&q->sysfs_lock);

/* drain all requests queued before DEAD marking */
blk_drain_queue(q, true);
/*
* Drain all requests queued before DEAD marking. The caller might
* be trying to tear down @q before its elevator is initialized, in
* which case we don't want to call into draining.
*/
if (q->elevator)
blk_drain_queue(q, true);

/* @q won't process any more request, flush async actions */
del_timer_sync(&q->backing_dev_info.laptop_mode_wb_timer);
Expand Down

0 comments on commit 8b293a2

Please sign in to comment.