diff mbox

[19/27] dm: dm.c: replace 'bio->bi_vcnt == 1' with !bio_multiple_segments

Message ID 1459858062-21075-5-git-send-email-tom.leiming@gmail.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Ming Lei April 5, 2016, 12:07 p.m. UTC
Signed-off-by: Ming Lei <tom.leiming@gmail.com>
---
 drivers/md/dm.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index be49057..4c34f88 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -2172,7 +2172,8 @@  static void dm_request_fn(struct request_queue *q)
 			pos = blk_rq_pos(rq);
 
 		if ((dm_request_peeked_before_merge_deadline(md) &&
-		     md_in_flight(md) && rq->bio && rq->bio->bi_vcnt == 1 &&
+		     md_in_flight(md) && rq->bio &&
+		     !bio_multiple_segments(rq->bio) &&
 		     md->last_rq_pos == pos && md->last_rq_rw == rq_data_dir(rq)) ||
 		    (ti->type->busy && ti->type->busy(ti))) {
 			blk_delay_queue(q, HZ / 100);