block: blocking mempool_alloc doesn't fail

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>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: Anuj Gupta <anuj20.g@samsung.com>
Reviewed-by: Kanchan Joshi <joshi.k@samsung.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
Christoph Hellwig 2025-11-03 05:16:44 -05:00 committed by Jens Axboe
parent 3f5b1169d2
commit eef09f742b
1 changed files with 0 additions and 4 deletions

View File

@ -158,8 +158,6 @@ bool bio_integrity_prep(struct bio *bio)
if (!buf) if (!buf)
goto err_end_io; goto err_end_io;
bid = mempool_alloc(&bid_pool, GFP_NOIO); bid = mempool_alloc(&bid_pool, GFP_NOIO);
if (!bid)
goto err_free_buf;
bio_integrity_init(bio, &bid->bip, &bid->bvec, 1); bio_integrity_init(bio, &bid->bip, &bid->bvec, 1);
bid->bio = bio; bid->bio = bio;
@ -187,8 +185,6 @@ bool bio_integrity_prep(struct bio *bio)
bid->saved_bio_iter = bio->bi_iter; bid->saved_bio_iter = bio->bi_iter;
return true; return true;
err_free_buf:
kfree(buf);
err_end_io: err_end_io:
bio->bi_status = BLK_STS_RESOURCE; bio->bi_status = BLK_STS_RESOURCE;
bio_endio(bio); bio_endio(bio);