summaryrefslogtreecommitdiffstats
path: root/block/blk-merge.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/blk-merge.c')
-rw-r--r--block/blk-merge.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/block/blk-merge.c b/block/blk-merge.c
index d9eddbc189f5..574ea7c0468f 100644
--- a/block/blk-merge.c
+++ b/block/blk-merge.c
@@ -440,6 +440,9 @@ int ll_back_merge_fn(struct request_queue *q, struct request *req,
{
if (req_gap_back_merge(req, bio))
return 0;
+ if (blk_integrity_rq(req) &&
+ integrity_req_gap_back_merge(req, bio))
+ return 0;
if (blk_rq_sectors(req) + bio_sectors(bio) >
blk_rq_get_max_sectors(req)) {
req->cmd_flags |= REQ_NOMERGE;
@@ -461,6 +464,9 @@ int ll_front_merge_fn(struct request_queue *q, struct request *req,
if (req_gap_front_merge(req, bio))
return 0;
+ if (blk_integrity_rq(req) &&
+ integrity_req_gap_front_merge(req, bio))
+ return 0;
if (blk_rq_sectors(req) + bio_sectors(bio) >
blk_rq_get_max_sectors(req)) {
req->cmd_flags |= REQ_NOMERGE;