From: Christoph Hellwig <hch@lst.de>
To: Jens Axboe <axboe@kernel.dk>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>,
linux-block@vger.kernel.org
Subject: [PATCH 1/2] block: blocking mempool_alloc doesn't fail
Date: Thu, 30 Oct 2025 15:44:53 +0100 [thread overview]
Message-ID: <20251030144530.1372226-2-hch@lst.de> (raw)
In-Reply-To: <20251030144530.1372226-1-hch@lst.de>
So remove the error check for it in bio_integrity_prep.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
---
block/bio-integrity-auto.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/block/bio-integrity-auto.c b/block/bio-integrity-auto.c
index 687952f63bbb..2f4a244749ac 100644
--- a/block/bio-integrity-auto.c
+++ b/block/bio-integrity-auto.c
@@ -158,8 +158,6 @@ bool bio_integrity_prep(struct bio *bio)
if (!buf)
goto err_end_io;
bid = mempool_alloc(&bid_pool, GFP_NOIO);
- if (!bid)
- goto err_free_buf;
bio_integrity_init(bio, &bid->bip, &bid->bvec, 1);
bid->bio = bio;
@@ -187,8 +185,6 @@ bool bio_integrity_prep(struct bio *bio)
bid->saved_bio_iter = bio->bi_iter;
return true;
-err_free_buf:
- kfree(buf);
err_end_io:
bio->bi_status = BLK_STS_RESOURCE;
bio_endio(bio);
--
2.47.3
next prev parent reply other threads:[~2025-10-30 14:45 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-30 14:44 make block layer auto-PI deadlock safe v2 Christoph Hellwig
2025-10-30 14:44 ` Christoph Hellwig [this message]
2025-10-30 14:44 ` [PATCH 2/2] block: make bio auto-integrity deadlock safe Christoph Hellwig
2025-11-03 3:24 ` Martin K. Petersen
-- strict thread matches above, loose matches on Subject: below --
2025-11-03 10:16 make block layer auto-PI deadlock safe v3 Christoph Hellwig
2025-11-03 10:16 ` [PATCH 1/2] block: blocking mempool_alloc doesn't fail Christoph Hellwig
2025-11-03 11:16 ` Kanchan Joshi
2025-11-03 11:26 ` John Garry
2025-11-03 11:52 ` Christoph Hellwig
2025-11-03 13:20 ` Anuj gupta
2025-11-03 13:28 ` Johannes Thumshirn
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=20251030144530.1372226-2-hch@lst.de \
--to=hch@lst.de \
--cc=axboe@kernel.dk \
--cc=linux-block@vger.kernel.org \
--cc=martin.petersen@oracle.com \
/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