diff options
| author | Christoph Hellwig <hch@lst.de> | 2017-06-19 03:24:41 -0400 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2017-06-20 21:21:48 -0400 |
| commit | efbeccdb59d666b9c77d505af01097cc0a9d102b (patch) | |
| tree | 158e3bcab08c68fc06359e8976df122476626657 | |
| parent | 80ab6af432523b33352771b1eca1cee793cc7c81 (diff) | |
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: Christoph Hellwig <hch@lst.de>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
| -rw-r--r-- | include/linux/blkdev.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 22cfba64ce81..0deed7274a7f 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
| @@ -815,7 +815,8 @@ static inline bool rq_mergeable(struct request *rq) | |||
| 815 | 815 | ||
| 816 | static inline bool blk_write_same_mergeable(struct bio *a, struct bio *b) | 816 | static inline bool blk_write_same_mergeable(struct bio *a, struct bio *b) |
| 817 | { | 817 | { |
| 818 | if (bio_data(a) == bio_data(b)) | 818 | if (bio_page(a) == bio_page(b) && |
| 819 | bio_offset(a) == bio_offset(b)) | ||
| 819 | return true; | 820 | return true; |
| 820 | 821 | ||
| 821 | return false; | 822 | return false; |
