All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Jens Axboe <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org
Subject: [PATCH 1/8] block: remove BIO_BUG_ON
Date: Tue, 12 Oct 2021 18:17:57 +0200	[thread overview]
Message-ID: <20211012161804.991559-2-hch@lst.de> (raw)
In-Reply-To: <20211012161804.991559-1-hch@lst.de>

BIO_DEBUG is always defined, so just switch the two instances to use
BUG_ON directly.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 block/bio.c         | 4 ++--
 include/linux/bio.h | 8 --------
 2 files changed, 2 insertions(+), 10 deletions(-)

diff --git a/block/bio.c b/block/bio.c
index a6fb6a0b42955..35b875563c8ba 100644
--- a/block/bio.c
+++ b/block/bio.c
@@ -156,7 +156,7 @@ static void bio_put_slab(struct bio_set *bs)
 
 void bvec_free(mempool_t *pool, struct bio_vec *bv, unsigned short nr_vecs)
 {
-	BIO_BUG_ON(nr_vecs > BIO_MAX_VECS);
+	BUG_ON(nr_vecs > BIO_MAX_VECS);
 
 	if (nr_vecs == BIO_MAX_VECS)
 		mempool_free(bv, pool);
@@ -677,7 +677,7 @@ static void bio_alloc_cache_destroy(struct bio_set *bs)
 void bio_put(struct bio *bio)
 {
 	if (unlikely(bio_flagged(bio, BIO_REFFED))) {
-		BIO_BUG_ON(!atomic_read(&bio->__bi_cnt));
+		BUG_ON(!atomic_read(&bio->__bi_cnt));
 		if (!atomic_dec_and_test(&bio->__bi_cnt))
 			return;
 	}
diff --git a/include/linux/bio.h b/include/linux/bio.h
index 00952e92eae1b..65a356fa71109 100644
--- a/include/linux/bio.h
+++ b/include/linux/bio.h
@@ -11,14 +11,6 @@
 #include <linux/blk_types.h>
 #include <linux/uio.h>
 
-#define BIO_DEBUG
-
-#ifdef BIO_DEBUG
-#define BIO_BUG_ON	BUG_ON
-#else
-#define BIO_BUG_ON
-#endif
-
 #define BIO_MAX_VECS		256U
 
 static inline unsigned int bio_max_segs(unsigned int nr_segs)
-- 
2.30.2


  reply	other threads:[~2021-10-12 16:20 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-12 16:17 decruft bio.h Christoph Hellwig
2021-10-12 16:17 ` Christoph Hellwig [this message]
2021-10-13  4:19   ` [PATCH 1/8] block: remove BIO_BUG_ON Chaitanya Kulkarni
2021-10-12 16:17 ` [PATCH 2/8] block: don't include <linux/ioprio.h> in <linux/bio.h> Christoph Hellwig
2021-10-13  4:19   ` Chaitanya Kulkarni
2021-10-12 16:17 ` [PATCH 3/8] block: move bio_mergeable out of bio.h Christoph Hellwig
2021-10-13  4:20   ` Chaitanya Kulkarni
2021-10-12 16:18 ` [PATCH 4/8] block: fold bio_cur_bytes into blk_rq_cur_bytes Christoph Hellwig
2021-10-13  4:20   ` Chaitanya Kulkarni
2021-10-12 16:18 ` [PATCH 5/8] block: move bio_full out of bio.h Christoph Hellwig
2021-10-13  4:20   ` Chaitanya Kulkarni
2021-10-12 16:18 ` [PATCH 6/8] block: mark __bio_try_merge_page static Christoph Hellwig
2021-10-13  4:21   ` Chaitanya Kulkarni
2021-10-12 16:18 ` [PATCH 7/8] block: move bio_get_{first,last}_bvec out of bio.h Christoph Hellwig
2021-10-13  4:21   ` Chaitanya Kulkarni
2021-10-12 16:18 ` [PATCH 8/8] block: mark bio_truncate static Christoph Hellwig
2021-10-13  4:22   ` Chaitanya Kulkarni
2021-10-12 19:47 ` decruft bio.h 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=20211012161804.991559-2-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.