diff options
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/floppy.c | 4 | ||||
-rw-r--r-- | drivers/block/xen-blkfront.c | 13 |
2 files changed, 10 insertions, 7 deletions
diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c index 1e27ed9208b4..e2c70d2085ae 100644 --- a/drivers/block/floppy.c +++ b/drivers/block/floppy.c | |||
@@ -931,7 +931,7 @@ static inline void unlock_fdc(void) | |||
931 | del_timer(&fd_timeout); | 931 | del_timer(&fd_timeout); |
932 | cont = NULL; | 932 | cont = NULL; |
933 | clear_bit(0, &fdc_busy); | 933 | clear_bit(0, &fdc_busy); |
934 | if (elv_next_request(floppy_queue)) | 934 | if (current_req || elv_next_request(floppy_queue)) |
935 | do_fd_request(floppy_queue); | 935 | do_fd_request(floppy_queue); |
936 | spin_unlock_irqrestore(&floppy_lock, flags); | 936 | spin_unlock_irqrestore(&floppy_lock, flags); |
937 | wake_up(&fdc_wait); | 937 | wake_up(&fdc_wait); |
@@ -2913,6 +2913,8 @@ static void redo_fd_request(void) | |||
2913 | 2913 | ||
2914 | spin_lock_irq(floppy_queue->queue_lock); | 2914 | spin_lock_irq(floppy_queue->queue_lock); |
2915 | req = elv_next_request(floppy_queue); | 2915 | req = elv_next_request(floppy_queue); |
2916 | if (req) | ||
2917 | blkdev_dequeue_request(req); | ||
2916 | spin_unlock_irq(floppy_queue->queue_lock); | 2918 | spin_unlock_irq(floppy_queue->queue_lock); |
2917 | if (!req) { | 2919 | if (!req) { |
2918 | do_floppy = NULL; | 2920 | do_floppy = NULL; |
diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c index 91fc56597e9b..66f834571b88 100644 --- a/drivers/block/xen-blkfront.c +++ b/drivers/block/xen-blkfront.c | |||
@@ -301,22 +301,23 @@ static void do_blkif_request(struct request_queue *rq) | |||
301 | 301 | ||
302 | while ((req = elv_next_request(rq)) != NULL) { | 302 | while ((req = elv_next_request(rq)) != NULL) { |
303 | info = req->rq_disk->private_data; | 303 | info = req->rq_disk->private_data; |
304 | if (!blk_fs_request(req)) { | ||
305 | __blk_end_request_cur(req, -EIO); | ||
306 | continue; | ||
307 | } | ||
308 | 304 | ||
309 | if (RING_FULL(&info->ring)) | 305 | if (RING_FULL(&info->ring)) |
310 | goto wait; | 306 | goto wait; |
311 | 307 | ||
308 | blkdev_dequeue_request(req); | ||
309 | |||
310 | if (!blk_fs_request(req)) { | ||
311 | __blk_end_request_all(req, -EIO); | ||
312 | continue; | ||
313 | } | ||
314 | |||
312 | pr_debug("do_blk_req %p: cmd %p, sec %lx, " | 315 | pr_debug("do_blk_req %p: cmd %p, sec %lx, " |
313 | "(%u/%u) buffer:%p [%s]\n", | 316 | "(%u/%u) buffer:%p [%s]\n", |
314 | req, req->cmd, (unsigned long)blk_rq_pos(req), | 317 | req, req->cmd, (unsigned long)blk_rq_pos(req), |
315 | blk_rq_cur_sectors(req), blk_rq_sectors(req), | 318 | blk_rq_cur_sectors(req), blk_rq_sectors(req), |
316 | req->buffer, rq_data_dir(req) ? "write" : "read"); | 319 | req->buffer, rq_data_dir(req) ? "write" : "read"); |
317 | 320 | ||
318 | |||
319 | blkdev_dequeue_request(req); | ||
320 | if (blkif_queue_request(req)) { | 321 | if (blkif_queue_request(req)) { |
321 | blk_requeue_request(rq, req); | 322 | blk_requeue_request(rq, req); |
322 | wait: | 323 | wait: |