diff options
author | Christoph Hellwig <hch@lst.de> | 2018-09-24 03:43:52 -0400 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2018-09-24 14:33:57 -0400 |
commit | 3dccdae54fe836a22cee9dc6df9fd1708ae075ce (patch) | |
tree | 95d8808538de6f977086e2603d75694d7c1848bc /block/bio.c | |
parent | 0e253391a970300fe4ae69d0c1d1ab494eb07508 (diff) |
block: merge BIOVEC_SEG_BOUNDARY into biovec_phys_mergeable
These two checks should always be performed together, so merge them into
a single helper.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/bio.c')
-rw-r--r-- | block/bio.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/block/bio.c b/block/bio.c index c254e5aa331f..e9f92b50724d 100644 --- a/block/bio.c +++ b/block/bio.c | |||
@@ -731,9 +731,7 @@ int bio_add_pc_page(struct request_queue *q, struct bio *bio, struct page | |||
731 | } | 731 | } |
732 | 732 | ||
733 | /* If we may be able to merge these biovecs, force a recount */ | 733 | /* If we may be able to merge these biovecs, force a recount */ |
734 | if (bio->bi_vcnt > 1 && | 734 | if (bio->bi_vcnt > 1 && biovec_phys_mergeable(q, bvec - 1, bvec)) |
735 | biovec_phys_mergeable(bvec - 1, bvec) && | ||
736 | BIOVEC_SEG_BOUNDARY(q, bvec - 1, bvec)) | ||
737 | bio_clear_flag(bio, BIO_SEG_VALID); | 735 | bio_clear_flag(bio, BIO_SEG_VALID); |
738 | 736 | ||
739 | done: | 737 | done: |