aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/block/xen-blkback/blkback.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/block/xen-blkback/blkback.c b/drivers/block/xen-blkback/blkback.c
index eaccc222a1dc..477a17c20820 100644
--- a/drivers/block/xen-blkback/blkback.c
+++ b/drivers/block/xen-blkback/blkback.c
@@ -1001,13 +1001,7 @@ static int dispatch_rw_block_io(struct xen_blkif *blkif,
1001 bio->bi_end_io = end_block_io_op; 1001 bio->bi_end_io = end_block_io_op;
1002 } 1002 }
1003 1003
1004 /*
1005 * We set it one so that the last submit_bio does not have to call
1006 * atomic_inc.
1007 */
1008 atomic_set(&pending_req->pendcnt, nbio); 1004 atomic_set(&pending_req->pendcnt, nbio);
1009
1010 /* Get a reference count for the disk queue and start sending I/O */
1011 blk_start_plug(&plug); 1005 blk_start_plug(&plug);
1012 1006
1013 for (i = 0; i < nbio; i++) 1007 for (i = 0; i < nbio; i++)
@@ -1035,6 +1029,7 @@ static int dispatch_rw_block_io(struct xen_blkif *blkif,
1035 fail_put_bio: 1029 fail_put_bio:
1036 for (i = 0; i < nbio; i++) 1030 for (i = 0; i < nbio; i++)
1037 bio_put(biolist[i]); 1031 bio_put(biolist[i]);
1032 atomic_set(&pending_req->pendcnt, 1);
1038 __end_block_io_op(pending_req, -EINVAL); 1033 __end_block_io_op(pending_req, -EINVAL);
1039 msleep(1); /* back off a bit */ 1034 msleep(1); /* back off a bit */
1040 return -EIO; 1035 return -EIO;