Signed-off-by: Christoph Hellwig <[email protected]>
---
 block/bio.c       | 3 +--
 block/blk-merge.c | 6 +++++-
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/block/bio.c b/block/bio.c
index 036e3f0cc736..fa1ea2ac66a8 100644
--- a/block/bio.c
+++ b/block/bio.c
@@ -571,14 +571,13 @@ void bio_put(struct bio *bio)
 }
 EXPORT_SYMBOL(bio_put);
 
-inline int bio_phys_segments(struct request_queue *q, struct bio *bio)
+int bio_phys_segments(struct request_queue *q, struct bio *bio)
 {
        if (unlikely(!bio_flagged(bio, BIO_SEG_VALID)))
                blk_recount_segments(q, bio);
 
        return bio->bi_phys_segments;
 }
-EXPORT_SYMBOL(bio_phys_segments);
 
 /**
  *     __bio_clone_fast - clone a bio that shares the original bio's biovec
diff --git a/block/blk-merge.c b/block/blk-merge.c
index 09591daf4993..62e97ec92034 100644
--- a/block/blk-merge.c
+++ b/block/blk-merge.c
@@ -264,7 +264,11 @@ void blk_queue_split(struct request_queue *q, struct bio 
**bio)
        }
 
        /* physical segments can be figured out during splitting */
-       res = split ? split : *bio;
+       if (split) {
+               res = split;
+       } else {
+               res = *bio;
+       }
        res->bi_phys_segments = nsegs;
        bio_set_flag(res, BIO_SEG_VALID);
 
-- 
2.19.2

Reply via email to