block: don't check ->rq_disk in merges
There is a 1:1 relationship between request_queues and gendisks now, so no need for these extra checks. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Link: https://lore.kernel.org/r/20211126121802.2090656-3-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
82baa324dc
commit
79bb1dbd12
|
@ -777,8 +777,7 @@ static struct request *attempt_merge(struct request_queue *q,
|
||||||
if (req_op(req) != req_op(next))
|
if (req_op(req) != req_op(next))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (rq_data_dir(req) != rq_data_dir(next)
|
if (rq_data_dir(req) != rq_data_dir(next))
|
||||||
|| req->rq_disk != next->rq_disk)
|
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (req_op(req) == REQ_OP_WRITE_SAME &&
|
if (req_op(req) == REQ_OP_WRITE_SAME &&
|
||||||
|
@ -905,10 +904,6 @@ bool blk_rq_merge_ok(struct request *rq, struct bio *bio)
|
||||||
if (bio_data_dir(bio) != rq_data_dir(rq))
|
if (bio_data_dir(bio) != rq_data_dir(rq))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
/* must be same device */
|
|
||||||
if (rq->rq_disk != bio->bi_bdev->bd_disk)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
/* only merge integrity protected bio into ditto rq */
|
/* only merge integrity protected bio into ditto rq */
|
||||||
if (blk_integrity_merge_bio(rq->q, rq, bio) == false)
|
if (blk_integrity_merge_bio(rq->q, rq, bio) == false)
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue