lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260115114356.4167248-1-wdhh6@aliyun.com>
Date: Thu, 15 Jan 2026 19:43:56 +0800
From: Chaohai Chen <wdhh6@...yun.com>
To: axboe@...nel.dk
Cc: linux-kernel@...r.kernel.org,
	Chaohai Chen <wdhh6@...yun.com>
Subject: [PATCH] block: remove the boring judgment in blk_rq_map_bio_alloc()

There is no need to check the return value of bio_alloc_bioset().

Signed-off-by: Chaohai Chen <wdhh6@...yun.com>
---
 block/blk-map.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/block/blk-map.c b/block/blk-map.c
index 4533094d9458..f95b07ec3b88 100644
--- a/block/blk-map.c
+++ b/block/blk-map.c
@@ -46,14 +46,8 @@ static struct bio *blk_rq_map_bio_alloc(struct request *rq,
 		unsigned int nr_vecs, gfp_t gfp_mask)
 {
 	struct block_device *bdev = rq->q->disk ? rq->q->disk->part0 : NULL;
-	struct bio *bio;
 
-	bio = bio_alloc_bioset(bdev, nr_vecs, rq->cmd_flags, gfp_mask,
-				&fs_bio_set);
-	if (!bio)
-		return NULL;
-
-	return bio;
+	return bio_alloc_bioset(bdev, nr_vecs, rq->cmd_flags, gfp_mask, &fs_bio_set);
 }
 
 /**
-- 
2.43.7


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ