diff options
Diffstat (limited to 'drivers/s390/block/dasd.c')
-rw-r--r-- | drivers/s390/block/dasd.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c index 7df03c7aea0d..e64f62d5e0fc 100644 --- a/drivers/s390/block/dasd.c +++ b/drivers/s390/block/dasd.c | |||
@@ -1656,17 +1656,13 @@ static void __dasd_process_request_queue(struct dasd_block *block) | |||
1656 | if (basedev->state < DASD_STATE_READY) | 1656 | if (basedev->state < DASD_STATE_READY) |
1657 | return; | 1657 | return; |
1658 | /* Now we try to fetch requests from the request queue */ | 1658 | /* Now we try to fetch requests from the request queue */ |
1659 | while (!blk_queue_plugged(queue) && | 1659 | while (!blk_queue_plugged(queue) && (req = blk_peek_request(queue))) { |
1660 | elv_next_request(queue)) { | ||
1661 | |||
1662 | req = elv_next_request(queue); | ||
1663 | |||
1664 | if (basedev->features & DASD_FEATURE_READONLY && | 1660 | if (basedev->features & DASD_FEATURE_READONLY && |
1665 | rq_data_dir(req) == WRITE) { | 1661 | rq_data_dir(req) == WRITE) { |
1666 | DBF_DEV_EVENT(DBF_ERR, basedev, | 1662 | DBF_DEV_EVENT(DBF_ERR, basedev, |
1667 | "Rejecting write request %p", | 1663 | "Rejecting write request %p", |
1668 | req); | 1664 | req); |
1669 | blkdev_dequeue_request(req); | 1665 | blk_start_request(req); |
1670 | __blk_end_request_all(req, -EIO); | 1666 | __blk_end_request_all(req, -EIO); |
1671 | continue; | 1667 | continue; |
1672 | } | 1668 | } |
@@ -1695,7 +1691,7 @@ static void __dasd_process_request_queue(struct dasd_block *block) | |||
1695 | "CCW creation failed (rc=%ld) " | 1691 | "CCW creation failed (rc=%ld) " |
1696 | "on request %p", | 1692 | "on request %p", |
1697 | PTR_ERR(cqr), req); | 1693 | PTR_ERR(cqr), req); |
1698 | blkdev_dequeue_request(req); | 1694 | blk_start_request(req); |
1699 | __blk_end_request_all(req, -EIO); | 1695 | __blk_end_request_all(req, -EIO); |
1700 | continue; | 1696 | continue; |
1701 | } | 1697 | } |
@@ -1705,7 +1701,7 @@ static void __dasd_process_request_queue(struct dasd_block *block) | |||
1705 | */ | 1701 | */ |
1706 | cqr->callback_data = (void *) req; | 1702 | cqr->callback_data = (void *) req; |
1707 | cqr->status = DASD_CQR_FILLED; | 1703 | cqr->status = DASD_CQR_FILLED; |
1708 | blkdev_dequeue_request(req); | 1704 | blk_start_request(req); |
1709 | list_add_tail(&cqr->blocklist, &block->ccw_queue); | 1705 | list_add_tail(&cqr->blocklist, &block->ccw_queue); |
1710 | dasd_profile_start(block, cqr, req); | 1706 | dasd_profile_start(block, cqr, req); |
1711 | } | 1707 | } |
@@ -2029,10 +2025,8 @@ static void dasd_flush_request_queue(struct dasd_block *block) | |||
2029 | return; | 2025 | return; |
2030 | 2026 | ||
2031 | spin_lock_irq(&block->request_queue_lock); | 2027 | spin_lock_irq(&block->request_queue_lock); |
2032 | while ((req = elv_next_request(block->request_queue))) { | 2028 | while ((req = blk_fetch_request(block->request_queue))) |
2033 | blkdev_dequeue_request(req); | ||
2034 | __blk_end_request_all(req, -EIO); | 2029 | __blk_end_request_all(req, -EIO); |
2035 | } | ||
2036 | spin_unlock_irq(&block->request_queue_lock); | 2030 | spin_unlock_irq(&block->request_queue_lock); |
2037 | } | 2031 | } |
2038 | 2032 | ||