aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/target/target_core_iblock.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/target/target_core_iblock.c')
-rw-r--r--drivers/target/target_core_iblock.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/target/target_core_iblock.c b/drivers/target/target_core_iblock.c
index 3df570db0e4..eb0afec046e 100644
--- a/drivers/target/target_core_iblock.c
+++ b/drivers/target/target_core_iblock.c
@@ -391,9 +391,8 @@ static int iblock_do_task(struct se_task *task)
391{ 391{
392 struct se_device *dev = task->task_se_cmd->se_dev; 392 struct se_device *dev = task->task_se_cmd->se_dev;
393 struct iblock_req *req = IBLOCK_REQ(task); 393 struct iblock_req *req = IBLOCK_REQ(task);
394 struct iblock_dev *ibd = (struct iblock_dev *)req->ib_dev;
395 struct request_queue *q = bdev_get_queue(ibd->ibd_bd);
396 struct bio *bio = req->ib_bio, *nbio = NULL; 394 struct bio *bio = req->ib_bio, *nbio = NULL;
395 struct blk_plug plug;
397 int rw; 396 int rw;
398 397
399 if (task->task_data_direction == DMA_TO_DEVICE) { 398 if (task->task_data_direction == DMA_TO_DEVICE) {
@@ -411,6 +410,7 @@ static int iblock_do_task(struct se_task *task)
411 rw = READ; 410 rw = READ;
412 } 411 }
413 412
413 blk_start_plug(&plug);
414 while (bio) { 414 while (bio) {
415 nbio = bio->bi_next; 415 nbio = bio->bi_next;
416 bio->bi_next = NULL; 416 bio->bi_next = NULL;
@@ -420,9 +420,8 @@ static int iblock_do_task(struct se_task *task)
420 submit_bio(rw, bio); 420 submit_bio(rw, bio);
421 bio = nbio; 421 bio = nbio;
422 } 422 }
423 blk_finish_plug(&plug);
423 424
424 if (q->unplug_fn)
425 q->unplug_fn(q);
426 return PYX_TRANSPORT_SENT_TO_TRANSPORT; 425 return PYX_TRANSPORT_SENT_TO_TRANSPORT;
427} 426}
428 427