public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: axboe@kernel.dk
Cc: linux-block@vger.kernel.org
Subject: [PATCH 2/7] block: remove the bio_phys_segments export
Date: Thu, 13 Dec 2018 21:32:09 +0100	[thread overview]
Message-ID: <20181213203214.10650-3-hch@lst.de> (raw)
In-Reply-To: <20181213203214.10650-1-hch@lst.de>

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 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


  parent reply	other threads:[~2018-12-13 20:32 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-13 20:32 misc block cleanups Christoph Hellwig
2018-12-13 20:32 ` [PATCH 1/7] block: remove bio_set_prio and bio_prio Christoph Hellwig
2018-12-13 20:32 ` Christoph Hellwig [this message]
2018-12-14  4:27   ` [PATCH 2/7] block: remove the bio_phys_segments export Jens Axboe
2018-12-13 20:32 ` [PATCH 3/7] block: remove the blk_recount_segments export Christoph Hellwig
2018-12-13 20:32 ` [PATCH 4/7] block: remove the unused bio_iov_iter_get_pages export Christoph Hellwig
2018-12-13 20:32 ` [PATCH 5/7] block: remove the unused bio_set_pages_dirty and bio_check_pages_dirty exports Christoph Hellwig
2018-12-13 20:32 ` [PATCH 6/7] block: remove the bioset_integrity_free export Christoph Hellwig
2018-12-13 20:32 ` [PATCH 7/7] block: remove the bio_integrity_advance export Christoph Hellwig
2018-12-14  4:28 ` misc block cleanups Jens Axboe
2018-12-14 13:00   ` Christoph Hellwig
2018-12-14 13:02     ` Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181213203214.10650-3-hch@lst.de \
    --to=hch@lst.de \
    --cc=axboe@kernel.dk \
    --cc=linux-block@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox