diff options
author | Jens Axboe <jaxboe@fusionio.com> | 2011-03-10 02:58:35 -0500 |
---|---|---|
committer | Jens Axboe <jaxboe@fusionio.com> | 2011-03-10 02:58:35 -0500 |
commit | 4c63f5646e405b5010cc9499419060bf2e838f5b (patch) | |
tree | df91ba315032c8ec4aafeb3ab96fdfa7c6c656e1 /block/blk-flush.c | |
parent | cafb0bfca1a73efd6d8a4a6a6a716e6134b96c24 (diff) | |
parent | 69d60eb96ae8a73cf9b79cf28051caf973006011 (diff) |
Merge branch 'for-2.6.39/stack-plug' into for-2.6.39/core
Conflicts:
block/blk-core.c
block/blk-flush.c
drivers/md/raid1.c
drivers/md/raid10.c
drivers/md/raid5.c
fs/nilfs2/btnode.c
fs/nilfs2/mdt.c
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'block/blk-flush.c')
-rw-r--r-- | block/blk-flush.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/block/blk-flush.c b/block/blk-flush.c index 0bd8c9c5d6e5..93d5fd8e51eb 100644 --- a/block/blk-flush.c +++ b/block/blk-flush.c | |||
@@ -194,7 +194,6 @@ static void flush_end_io(struct request *flush_rq, int error) | |||
194 | { | 194 | { |
195 | struct request_queue *q = flush_rq->q; | 195 | struct request_queue *q = flush_rq->q; |
196 | struct list_head *running = &q->flush_queue[q->flush_running_idx]; | 196 | struct list_head *running = &q->flush_queue[q->flush_running_idx]; |
197 | bool was_empty = elv_queue_empty(q); | ||
198 | bool queued = false; | 197 | bool queued = false; |
199 | struct request *rq, *n; | 198 | struct request *rq, *n; |
200 | 199 | ||
@@ -218,7 +217,7 @@ static void flush_end_io(struct request *flush_rq, int error) | |||
218 | * from request completion path and calling directly into | 217 | * from request completion path and calling directly into |
219 | * request_fn may confuse the driver. Always use kblockd. | 218 | * request_fn may confuse the driver. Always use kblockd. |
220 | */ | 219 | */ |
221 | if (queued && was_empty) | 220 | if (queued) |
222 | __blk_run_queue(q, true); | 221 | __blk_run_queue(q, true); |
223 | } | 222 | } |
224 | 223 | ||
@@ -269,13 +268,12 @@ static bool blk_kick_flush(struct request_queue *q) | |||
269 | static void flush_data_end_io(struct request *rq, int error) | 268 | static void flush_data_end_io(struct request *rq, int error) |
270 | { | 269 | { |
271 | struct request_queue *q = rq->q; | 270 | struct request_queue *q = rq->q; |
272 | bool was_empty = elv_queue_empty(q); | ||
273 | 271 | ||
274 | /* | 272 | /* |
275 | * After populating an empty queue, kick it to avoid stall. Read | 273 | * After populating an empty queue, kick it to avoid stall. Read |
276 | * the comment in flush_end_io(). | 274 | * the comment in flush_end_io(). |
277 | */ | 275 | */ |
278 | if (blk_flush_complete_seq(rq, REQ_FSEQ_DATA, error) && was_empty) | 276 | if (blk_flush_complete_seq(rq, REQ_FSEQ_DATA, error)) |
279 | __blk_run_queue(q, true); | 277 | __blk_run_queue(q, true); |
280 | } | 278 | } |
281 | 279 | ||