diff options
Diffstat (limited to 'drivers/block/paride/pf.c')
-rw-r--r-- | drivers/block/paride/pf.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/block/paride/pf.c b/drivers/block/paride/pf.c index e88c889aa7f2..d6f7bd84ed39 100644 --- a/drivers/block/paride/pf.c +++ b/drivers/block/paride/pf.c | |||
@@ -752,10 +752,8 @@ static struct request_queue *pf_queue; | |||
752 | 752 | ||
753 | static void pf_end_request(int err) | 753 | static void pf_end_request(int err) |
754 | { | 754 | { |
755 | if (pf_req) { | 755 | if (pf_req && !__blk_end_request_cur(pf_req, err)) |
756 | __blk_end_request_cur(pf_req, err); | ||
757 | pf_req = NULL; | 756 | pf_req = NULL; |
758 | } | ||
759 | } | 757 | } |
760 | 758 | ||
761 | static void do_pf_request(struct request_queue * q) | 759 | static void do_pf_request(struct request_queue * q) |
@@ -763,9 +761,12 @@ static void do_pf_request(struct request_queue * q) | |||
763 | if (pf_busy) | 761 | if (pf_busy) |
764 | return; | 762 | return; |
765 | repeat: | 763 | repeat: |
766 | pf_req = elv_next_request(q); | 764 | if (!pf_req) { |
767 | if (!pf_req) | 765 | pf_req = elv_next_request(q); |
768 | return; | 766 | if (!pf_req) |
767 | return; | ||
768 | blkdev_dequeue_request(pf_req); | ||
769 | } | ||
769 | 770 | ||
770 | pf_current = pf_req->rq_disk->private_data; | 771 | pf_current = pf_req->rq_disk->private_data; |
771 | pf_block = blk_rq_pos(pf_req); | 772 | pf_block = blk_rq_pos(pf_req); |
@@ -806,7 +807,6 @@ static int pf_next_buf(void) | |||
806 | if (!pf_count) { | 807 | if (!pf_count) { |
807 | spin_lock_irqsave(&pf_spin_lock, saved_flags); | 808 | spin_lock_irqsave(&pf_spin_lock, saved_flags); |
808 | pf_end_request(0); | 809 | pf_end_request(0); |
809 | pf_req = elv_next_request(pf_queue); | ||
810 | spin_unlock_irqrestore(&pf_spin_lock, saved_flags); | 810 | spin_unlock_irqrestore(&pf_spin_lock, saved_flags); |
811 | if (!pf_req) | 811 | if (!pf_req) |
812 | return 1; | 812 | return 1; |