From patchwork Wed Mar 29 17:06:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Thumshirn X-Patchwork-Id: 13192963 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 215FDC77B61 for ; Wed, 29 Mar 2023 17:07:04 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id AB484280007; Wed, 29 Mar 2023 13:07:03 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A1694280001; Wed, 29 Mar 2023 13:07:03 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8903E280007; Wed, 29 Mar 2023 13:07:03 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 74A3E280001 for ; Wed, 29 Mar 2023 13:07:03 -0400 (EDT) Received: from smtpin30.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 546EC80D4A for ; Wed, 29 Mar 2023 17:07:03 +0000 (UTC) X-FDA: 80622565926.30.AFFCD53 Received: from esa6.hgst.iphmx.com (esa6.hgst.iphmx.com [216.71.154.45]) by imf21.hostedemail.com (Postfix) with ESMTP id 46CC41C001D for ; Wed, 29 Mar 2023 17:07:01 +0000 (UTC) Authentication-Results: imf21.hostedemail.com; dkim=pass header.d=wdc.com header.s=dkim.wdc.com header.b="kXLB/kNC"; spf=pass (imf21.hostedemail.com: domain of "prvs=445a3f1bb=johannes.thumshirn@wdc.com" designates 216.71.154.45 as permitted sender) smtp.mailfrom="prvs=445a3f1bb=johannes.thumshirn@wdc.com"; dmarc=pass (policy=quarantine) header.from=wdc.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1680109621; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=v9JYsFFh+6NfyNyVYGuW1Txk804ur9V9DJTJVqHfYm0=; b=QgtPgBUe3MqrvfRrFWLj1m2HDgl9+bdoPqyxvPiYke15X+nbHhpIlh5w5e4bCvLAOMhadP GWpJYPzFSQmahPV9sDiJoqYoa1aQHdxCfkoQJqRxGX2DmbsrOhpymcEQdm8vRg2VdsE1Nl D+f1DmsS/OlGqvJdyPJcfa1afhHsUJQ= ARC-Authentication-Results: i=1; imf21.hostedemail.com; dkim=pass header.d=wdc.com header.s=dkim.wdc.com header.b="kXLB/kNC"; spf=pass (imf21.hostedemail.com: domain of "prvs=445a3f1bb=johannes.thumshirn@wdc.com" designates 216.71.154.45 as permitted sender) smtp.mailfrom="prvs=445a3f1bb=johannes.thumshirn@wdc.com"; dmarc=pass (policy=quarantine) header.from=wdc.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1680109621; a=rsa-sha256; cv=none; b=U7BdI7511Ju8NYs/SXWk+q5rkhjAPxqSeJP1nLrjbioC//xRHGs8OGJowJCxKyNb1e4VRw YvbKY7zKgH+yy7FRbliYTwwm1ZL+8WHdb+yF10ajmlxtU3KFylSch1i+0t9Mi3eUqI5sse hbKk6XgdUQf5imJaHanupbmHrd0npQo= DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1680109621; x=1711645621; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=aE/Ow89gy2yLxstCkn4viK+sWgyzq7OT7iYTFC2IcIM=; b=kXLB/kNCChkwkoR4jQ9Q2t2+4L6xEXJ8Vcb8pp0eys8x2yi/hJzhRwmT +vffJL2XWKPXabcNsB9haBvHv/k1Tn1PPwcBKm9Lk7Ml+j/27kqBtQZd9 w2LzCOfd6ay+HE0/pMLyqejNsVXxKHP6py8Z6864K6oWZ+mEsU03G5xvS 7pGafJmBkEfEl5kisTR4j5P+UaYvhQlOi8wzFByUtjKuvp3rIMJczingF aGa2ELIOPJI7QSlgVZivY8rQ++RyNs68ZjyNHrwLClPOmKCmwG7wNy3SG 3fZ0uYzlRJ6hfdqJmjToSEMohBdvr+hWJRlvTPyKrbO4GpIIWjZnzYHFG Q==; X-IronPort-AV: E=Sophos;i="5.98,301,1673884800"; d="scan'208";a="226807089" Received: from h199-255-45-14.hgst.com (HELO uls-op-cesaep01.wdc.com) ([199.255.45.14]) by ob1.hgst.iphmx.com with ESMTP; 30 Mar 2023 01:07:00 +0800 IronPort-SDR: HgHr8TOO8pxRq7AgzO173/R/FRS4yMO/IenjksMKFVGFrJ7+MMYbo2ybnk33qf1xEs05HP3dsP I15mV2HW6xaMLC0C1uumPVRIBXsBqso8/9ZP8m3LrYN7b9X9E29+qf9nJDGddR5M1QmLmViCT4 k/75MQvh5RsHKYsvMpSuDasfR7dWf/Uyp3UQv0KAcgJB0qKrg3CN+s0sT/hM/didRDxn9Z3Ubm TfTbxut3CTCl2trHFZGSbeaHyBDxPuMRnyy/7szCwEdm+X3Dmr1LUKI/jtrvHUqMfc3+kJCe/2 dkQ= Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 29 Mar 2023 09:23:10 -0700 IronPort-SDR: U5CGYwW7Mew4WMH5XhHkS/wuvmKwsV1daJfGn7mZ+KLy/D/2KzvAdqeW79QUzxkDDWCslNWS+3 hfvcVA5xa6rhSLDzb3KfH/lUhdr07i4tMiJaXo9yDb7M099aYD7m8SSm1/TGzyiWeuthdMo6G4 1dqWHhFwukM6o56/rWlCzBDM8Yn4tgV0RKs3pHn6poLpoeq6m4TkzOJgNZqdXwKHDt6xdkbOI+ GotM7nHfSGcs2b2MrRQzeYXxRBWgESDZAFW7lZj9grqtdnnN4x1FPIawAtJPMCytnEQx+jwiWl t5c= WDCIronportException: Internal Received: from unknown (HELO redsun91.ssa.fujisawa.hgst.com) ([10.149.66.72]) by uls-op-cesaip01.wdc.com with ESMTP; 29 Mar 2023 10:07:00 -0700 From: Johannes Thumshirn To: Jens Axboe Cc: Christoph Hellwig , Hannes Reinecke , Chaitanya Kulkarni , Damien Le Moal , Ming Lei , linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, dm-devel@redhat.com, Song Liu , linux-raid@vger.kernel.org, Mike Snitzer , Matthew Wilcox , Dave Kleikamp , jfs-discussion@lists.sourceforge.net, cluster-devel@redhat.com, Bob Peterson , Andreas Gruenbacher , David Sterba , linux-btrfs@vger.kernel.org, Johannes Thumshirn Subject: [PATCH 14/19] floppy: use __bio_add_page for adding single page to bio Date: Wed, 29 Mar 2023 10:06:00 -0700 Message-Id: X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 46CC41C001D X-Stat-Signature: u8yfz99bwb398nryewrt7zyxh7sss4sj X-Rspam-User: X-HE-Tag: 1680109621-50363 X-HE-Meta: U2FsdGVkX1/oKQ/vhRkQrUIOIbcGFcEMx886/h4t+FJVAZ+bAfeh469HujImiYKvgQkRcxSDgs0Erp1rk6NWLVsw79N8hwVbP/ijH5we9FAAyAYhcutASGkq5RoquqvMyXCm6n6Gpv/Ig00NiZLwV8pvgRn2VK3ZTqBEkR4ZYea82z2p83D3W1cl8hiIgqEi/RUidrCKO4bjfxQSm5dcUg4CFiUH9Uw7xOsdO4fz23/eiwAVqM1u5cQ1mjVTF9mRU4gIsKEmfbXaGh04WANsK4WDcCt+3AGid1URdwUCmRpSvgPjXhWydzc3+AVwEo9TnaQq0OgbjRwjK/IPUyNtn6Px6TBRrSD1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0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: The floppy code uses bio_add_page() to add a page to a newly created bio. bio_add_page() can fail, but the return value is never checked. Use __bio_add_page() as adding a single page to a newly created bio is guaranteed to succeed. This brings us a step closer to marking bio_add_page() as __must_check. Signed-off-by: Johannes Thumshirn Reviewed-by: Damien Le Moal --- drivers/block/floppy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c index 487840e3564d..6f46a30f7c36 100644 --- a/drivers/block/floppy.c +++ b/drivers/block/floppy.c @@ -4147,7 +4147,7 @@ static int __floppy_read_block_0(struct block_device *bdev, int drive) cbdata.drive = drive; bio_init(&bio, bdev, &bio_vec, 1, REQ_OP_READ); - bio_add_page(&bio, page, block_size(bdev), 0); + __bio_add_page(&bio, page, block_size(bdev), 0); bio.bi_iter.bi_sector = 0; bio.bi_flags |= (1 << BIO_QUIET);