From nobody Mon Feb 9 10:49:21 2026 Received: from out30-86.freemail.mail.aliyun.com (out30-86.freemail.mail.aliyun.com [115.124.30.86]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F1A1E387560 for ; Thu, 15 Jan 2026 11:44:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.124.30.86 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768477450; cv=none; b=FC0NHd/Y7kSruOhlhwLc0UO696BXA74qtcxwRZg2VDSm8o6k6Fy1PbKHXDrJHLnaNpFnkPG5gendOJ2wvJbx8pWOnug1Ne9HvWg7PKAdKaxleh3uRG76PFjZmww9YWP4PULDd236S3xj5CqPdHmw3NIhMnTNwL8mdjg7W2NeRYw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768477450; c=relaxed/simple; bh=6JEjGbKc8HC4IOF6v8y177zH9zKivJz4uxgOoyPtHE4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=MNP0CXBQP4C4D12hrw2n2rcQXXKSLfkctuibRTlJj2x32ypT7qCUR0EmjD/OKecPfZfA2UBpgSLlnX86g85069GtznumoqV/W1P+jqvjCJOu2lt1hE/rXt7JWtU32/itnzLE8g5GxAImRBWjZnXo5/u3y01rMNOCGHK+lj8S/is= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=aliyun.com; spf=pass smtp.mailfrom=aliyun.com; dkim=pass (1024-bit key) header.d=aliyun.com header.i=@aliyun.com header.b=Ky+dLyLr; arc=none smtp.client-ip=115.124.30.86 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=aliyun.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=aliyun.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=aliyun.com header.i=@aliyun.com header.b="Ky+dLyLr" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aliyun.com; s=s1024; t=1768477444; h=From:To:Subject:Date:Message-ID:MIME-Version; bh=zOvYSuruqjXWcfD4dSZhtL95h6cZLGWBWlsA74j96GY=; b=Ky+dLyLrxZMJOUvkW7sjlqreZEOHB5kUJ2HJ74d7DLw5SbqPzhAC3wMUDMZsIdWy+HY0Aj/WhiMFktwE3Cj16aABxTa41haxTH2YrLeh8JoxxziQ92K/pmdEMqKt9h4yHCT4HqJHn2aSSS39oAMz9tosXJg10htf6N+b3peunyU= Received: from localhost.localdomain(mailfrom:wdhh6@aliyun.com fp:SMTPD_---0Wx6Q72V_1768477439 cluster:ay36) by smtp.aliyun-inc.com; Thu, 15 Jan 2026 19:44:04 +0800 From: Chaohai Chen To: axboe@kernel.dk Cc: linux-kernel@vger.kernel.org, Chaohai Chen Subject: [PATCH] block: remove the boring judgment in blk_rq_map_bio_alloc() Date: Thu, 15 Jan 2026 19:43:56 +0800 Message-ID: <20260115114356.4167248-1-wdhh6@aliyun.com> X-Mailer: git-send-email 2.43.7 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" There is no need to check the return value of bio_alloc_bioset(). Signed-off-by: Chaohai Chen --- 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 =3D rq->q->disk ? rq->q->disk->part0 : NULL; - struct bio *bio; =20 - bio =3D 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_s= et); } =20 /** --=20 2.43.7