summaryrefslogtreecommitdiffstats
path: root/drivers/memstick
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/memstick')
-rw-r--r--drivers/memstick/core/mspro_block.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/memstick/core/mspro_block.c b/drivers/memstick/core/mspro_block.c
index 93b2c6185656..58f5be8cd69e 100644
--- a/drivers/memstick/core/mspro_block.c
+++ b/drivers/memstick/core/mspro_block.c
@@ -672,8 +672,7 @@ try_again:
msb->req_sg);
if (!msb->seg_count) {
- chunk = __blk_end_request(msb->block_req, -ENOMEM,
- blk_rq_cur_bytes(msb->block_req));
+ chunk = __blk_end_request_cur(msb->block_req, -ENOMEM);
continue;
}
@@ -711,6 +710,7 @@ try_again:
dev_dbg(&card->dev, "issue end\n");
return -EAGAIN;
}
+ blkdev_dequeue_request(msb->block_req);
dev_dbg(&card->dev, "trying again\n");
chunk = 1;
@@ -825,8 +825,10 @@ static void mspro_block_submit_req(struct request_queue *q)
return;
if (msb->eject) {
- while ((req = elv_next_request(q)) != NULL)
+ while ((req = elv_next_request(q)) != NULL) {
+ blkdev_dequeue_request(req);
__blk_end_request_all(req, -ENODEV);
+ }
return;
}