diff options
Diffstat (limited to 'drivers/block/swim.c')
-rw-r--r-- | drivers/block/swim.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/block/swim.c b/drivers/block/swim.c index d22cc3856937..6544a7b06bf0 100644 --- a/drivers/block/swim.c +++ b/drivers/block/swim.c | |||
@@ -532,39 +532,39 @@ static void redo_fd_request(struct request_queue *q) | |||
532 | 532 | ||
533 | fs = req->rq_disk->private_data; | 533 | fs = req->rq_disk->private_data; |
534 | if (req->sector < 0 || req->sector >= fs->total_secs) { | 534 | if (req->sector < 0 || req->sector >= fs->total_secs) { |
535 | end_request(req, 0); | 535 | __blk_end_request_cur(req, -EIO); |
536 | continue; | 536 | continue; |
537 | } | 537 | } |
538 | if (req->current_nr_sectors == 0) { | 538 | if (req->current_nr_sectors == 0) { |
539 | end_request(req, 1); | 539 | __blk_end_request_cur(req, 0); |
540 | continue; | 540 | continue; |
541 | } | 541 | } |
542 | if (!fs->disk_in) { | 542 | if (!fs->disk_in) { |
543 | end_request(req, 0); | 543 | __blk_end_request_cur(req, -EIO); |
544 | continue; | 544 | continue; |
545 | } | 545 | } |
546 | if (rq_data_dir(req) == WRITE) { | 546 | if (rq_data_dir(req) == WRITE) { |
547 | if (fs->write_protected) { | 547 | if (fs->write_protected) { |
548 | end_request(req, 0); | 548 | __blk_end_request_cur(req, -EIO); |
549 | continue; | 549 | continue; |
550 | } | 550 | } |
551 | } | 551 | } |
552 | switch (rq_data_dir(req)) { | 552 | switch (rq_data_dir(req)) { |
553 | case WRITE: | 553 | case WRITE: |
554 | /* NOT IMPLEMENTED */ | 554 | /* NOT IMPLEMENTED */ |
555 | end_request(req, 0); | 555 | __blk_end_request_cur(req, -EIO); |
556 | break; | 556 | break; |
557 | case READ: | 557 | case READ: |
558 | if (floppy_read_sectors(fs, req->sector, | 558 | if (floppy_read_sectors(fs, req->sector, |
559 | req->current_nr_sectors, | 559 | req->current_nr_sectors, |
560 | req->buffer)) { | 560 | req->buffer)) { |
561 | end_request(req, 0); | 561 | __blk_end_request_cur(req, -EIO); |
562 | continue; | 562 | continue; |
563 | } | 563 | } |
564 | req->nr_sectors -= req->current_nr_sectors; | 564 | req->nr_sectors -= req->current_nr_sectors; |
565 | req->sector += req->current_nr_sectors; | 565 | req->sector += req->current_nr_sectors; |
566 | req->buffer += req->current_nr_sectors * 512; | 566 | req->buffer += req->current_nr_sectors * 512; |
567 | end_request(req, 1); | 567 | __blk_end_request_cur(req, 0); |
568 | break; | 568 | break; |
569 | } | 569 | } |
570 | } | 570 | } |