Commit efbeccdb authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Jens Axboe

block: stop using bio_data() in blk_write_same_mergeable

While the Write Same page currently always is in low-level it is just
as easy and safer to just compare the page and offset directly.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 80ab6af4
...@@ -815,7 +815,8 @@ static inline bool rq_mergeable(struct request *rq) ...@@ -815,7 +815,8 @@ static inline bool rq_mergeable(struct request *rq)
static inline bool blk_write_same_mergeable(struct bio *a, struct bio *b) static inline bool blk_write_same_mergeable(struct bio *a, struct bio *b)
{ {
if (bio_data(a) == bio_data(b)) if (bio_page(a) == bio_page(b) &&
bio_offset(a) == bio_offset(b))
return true; return true;
return false; return false;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment