aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--block/blk-merge.c2
-rw-r--r--block/blk.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/block/blk-merge.c b/block/blk-merge.c
index 6b5ad275ed56..208658a901c6 100644
--- a/block/blk-merge.c
+++ b/block/blk-merge.c
@@ -46,7 +46,7 @@ static inline bool bio_will_gap(struct request_queue *q,
46 bio_get_first_bvec(prev_rq->bio, &pb); 46 bio_get_first_bvec(prev_rq->bio, &pb);
47 else 47 else
48 bio_get_first_bvec(prev, &pb); 48 bio_get_first_bvec(prev, &pb);
49 if (pb.bv_offset) 49 if (pb.bv_offset & queue_virt_boundary(q))
50 return true; 50 return true;
51 51
52 /* 52 /*
diff --git a/block/blk.h b/block/blk.h
index a1841b8ff129..c85e53f21cdd 100644
--- a/block/blk.h
+++ b/block/blk.h
@@ -169,7 +169,7 @@ static inline bool biovec_phys_mergeable(struct request_queue *q,
169static inline bool __bvec_gap_to_prev(struct request_queue *q, 169static inline bool __bvec_gap_to_prev(struct request_queue *q,
170 struct bio_vec *bprv, unsigned int offset) 170 struct bio_vec *bprv, unsigned int offset)
171{ 171{
172 return offset || 172 return (offset & queue_virt_boundary(q)) ||
173 ((bprv->bv_offset + bprv->bv_len) & queue_virt_boundary(q)); 173 ((bprv->bv_offset + bprv->bv_len) & queue_virt_boundary(q));
174} 174}
175 175