summaryrefslogtreecommitdiff
path: root/drivers/md/dm-rq.c
diff options
context:
space:
mode:
authorMing Lei <tom.leiming@gmail.com>2016-11-11 20:05:36 +0800
committerMike Snitzer <snitzer@redhat.com>2016-11-21 09:51:57 -0500
commit4f9c74c6043891d415730bcb153c579be35c352f (patch)
treeede04ea1835185c5e4b72ef58cb7477b2432e49a /drivers/md/dm-rq.c
parentd15bb3a6467e102e60d954aadda5fb19ce6fd8ec (diff)
dm rq: replace 'bio->bi_vcnt == 1' with !bio_multiple_segments
Avoid accessing .bi_vcnt directly, because the bio can be split from block layer and .bi_vcnt should never have been used here. Signed-off-by: Ming Lei <tom.leiming@gmail.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md/dm-rq.c')
-rw-r--r--drivers/md/dm-rq.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/dm-rq.c b/drivers/md/dm-rq.c
index 31a89c8832c0..54b081588b55 100644
--- a/drivers/md/dm-rq.c
+++ b/drivers/md/dm-rq.c
@@ -825,7 +825,7 @@ static void dm_old_request_fn(struct request_queue *q)
pos = blk_rq_pos(rq);
if ((dm_old_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, 10);