From patchwork Thu Mar 30 10:43:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Thumshirn X-Patchwork-Id: 13193870 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 4B8A8C6FD1D for ; Thu, 30 Mar 2023 10:44:42 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id DDFDF280005; Thu, 30 Mar 2023 06:44:41 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D4030280001; Thu, 30 Mar 2023 06:44:41 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BB95F280005; Thu, 30 Mar 2023 06:44:41 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id AAAD5280001 for ; Thu, 30 Mar 2023 06:44:41 -0400 (EDT) Received: from smtpin19.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 8467A1208FE for ; Thu, 30 Mar 2023 10:44:41 +0000 (UTC) X-FDA: 80625231162.19.25BC70F Received: from esa3.hgst.iphmx.com (esa3.hgst.iphmx.com [216.71.153.141]) by imf27.hostedemail.com (Postfix) with ESMTP id 795A040007 for ; Thu, 30 Mar 2023 10:44:39 +0000 (UTC) Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=wdc.com header.s=dkim.wdc.com header.b=erLhAW7t; spf=pass (imf27.hostedemail.com: domain of "prvs=446327cdf=johannes.thumshirn@wdc.com" designates 216.71.153.141 as permitted sender) smtp.mailfrom="prvs=446327cdf=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=1680173079; 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=4znaqGhuMUu6D8mA0pJ9FDuoICW/Ene3/EJOcrwZvvc=; b=4swNBt+AmhhFiDCN077XwzCcYHps4YszvaQbDY7+ISqRedqaXL+OEDonlTu43y6crALHv/ u00YVedbmembAIUhfZs0MXwtDaFUMX1gmzpSZj5egDP2s35+gXjF0Lw0iqjdbhmZ2s6mww VNDOq9MWwkxPM9mElbsZv39mnWHP4PU= ARC-Authentication-Results: i=1; imf27.hostedemail.com; dkim=pass header.d=wdc.com header.s=dkim.wdc.com header.b=erLhAW7t; spf=pass (imf27.hostedemail.com: domain of "prvs=446327cdf=johannes.thumshirn@wdc.com" designates 216.71.153.141 as permitted sender) smtp.mailfrom="prvs=446327cdf=johannes.thumshirn@wdc.com"; dmarc=pass (policy=quarantine) header.from=wdc.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1680173079; a=rsa-sha256; cv=none; b=GrvDHzYq/9cHkge88jICIfp9KgVD9Dzy3vL5HUxsRQFtbPlGHG6+LGm84Wz4Rs4Yo5VV2N pDi110VWzqU10rh7NMoW2bu8jfnGf7Nr36qLZFH/0ZadBKg4yo74ry0icV+kzwkSGdkSHM cM/5JH9Y6YmpqlVbxbngQRMvST9uvfU= DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1680173079; x=1711709079; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=+EV0JXQ4xe5HTVfKptkUC3VI1nVjFYuHFxhKcqwjlik=; b=erLhAW7teB86a+4DYNjHkCTkXsxNq3uvXFK+uVLXnfQKZpiUcjGWhZev ar/5GawkC9OJseLwV+m5qjikxDZng6oS2N8Gl8ki3qPYYNdst3J0YfAZn Bv5XOY9O7ckmVXd01BHKPD+XXwE4pb9rQY6i5uZYFYXQe+6baPgpuMnbO nI1xGPeruEDGfRNspZWqxzKLzHoYYNNw+up4B5Ejch0wlmjlpQv9LhRr+ 5LAwj0SPebX0+1LDAtitFdxUVuL9F00aI1Bct2mQWeCBwPbx2dku052Ba 4xn7FHDVHllQzg+AFIa+ebOjoTTx1eRREk+2Y0ngPNg0RSxZ+6ZJLAz1D A==; X-IronPort-AV: E=Sophos;i="5.98,303,1673884800"; d="scan'208";a="231853943" Received: from h199-255-45-15.hgst.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 30 Mar 2023 18:44:38 +0800 IronPort-SDR: jF9JIXBdau2DU4khf5dtCC/LEB/RpnoGAjZWZL+m4W482ZcC6En2NCZ+mTOQlNY3goVPBNPA6n dndmhrOaPhGURYF9dIXYPrsP+DkrjjOtkLz7RMBesmJbxfn6aaxQtIF3ZKQivc8J5tMfoLI8st Da4kViCac7e3nOcNXNVGEQvnEiimaGBrpj5i7Y1iRpS6LXjGFNPZZRJiRNCOO0fpidT6op37SI x2c/ni3o95fE0JEXfG4eBO2sB8Rkq0pVMalOzmvAN/K0h/U79530eR8oz+1k3Ps4pToEzTxKYD Zag= Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 30 Mar 2023 02:55:05 -0700 IronPort-SDR: 0juN/UCrJrwrTW9FmNQ8IreQ3Z/kXco76QckMcW+qQoSIff9Nyhb6/OfK/wD1wpfYAg5ZX87cC hHTNwhN6I4j0PtZkl5gWf547ViC6MsjnMiBEri75CfYRnl72fKv/Ii3ZodjlNoW9efkmVbaTT1 Dz+z9w4GmptBfajSperiop6zUnGQTatXM6ubDhqu32VMSVzozkhANFY1FLEu8lZ5j3+I02RtEr AfbmNUU2OTcGt219K9VJZ5i/36ngrCQVIiGqlblt18Dsz9wpIPU3/3tF9Rx1KRr3aX1G/Fwzqk qgA= WDCIronportException: Internal Received: from unknown (HELO redsun91.ssa.fujisawa.hgst.com) ([10.149.66.72]) by uls-op-cesaip01.wdc.com with ESMTP; 30 Mar 2023 03:44:36 -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 , Damien Le Moal Subject: [PATCH v2 11/19] gfs: use __bio_add_page for adding single page to bio Date: Thu, 30 Mar 2023 03:43:53 -0700 Message-Id: <2ede486fde05be1b97328579c5f84da48efe9156.1680172791.git.johannes.thumshirn@wdc.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 795A040007 X-Rspam-User: X-Stat-Signature: iqxzifafyd5ty356ew9c691rckeh3u76 X-HE-Tag: 1680173079-67017 X-HE-Meta: U2FsdGVkX1+G4z+QfGoGJVXtYKJWsUYFZ0o6G/Ld68oocFUexVqU00P1mjGk3kTpzmsynd4NMjW+iOIXn/6PtNSpy7Jrt5xnnv1WkwaCduVwr0GCYAU+jR/n7wJH0ESP9RBW4Ip16VfspJf+8BLmIXhKJ/WviCAPak2yHUX3XpDoPiWru25/0AVz6QuL27CdOrttXFL8eX2u9+ccfURX2ReKu5AvCcHMBptdFLx5tZI5HmR104anQlpIOd+5WHGfc6PyzreOvItWxZCFkzULpx9cG6YgqrCJRLRgGqhZ9B29gqhn3mebJeUq8vwh7bNydvoE5NToKRF1T4p4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osity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: The GFS superblock reading 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 --- fs/gfs2/ops_fstype.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c index 6de901c3b89b..e0cd0d43b12f 100644 --- a/fs/gfs2/ops_fstype.c +++ b/fs/gfs2/ops_fstype.c @@ -254,7 +254,7 @@ static int gfs2_read_super(struct gfs2_sbd *sdp, sector_t sector, int silent) bio = bio_alloc(sb->s_bdev, 1, REQ_OP_READ | REQ_META, GFP_NOFS); bio->bi_iter.bi_sector = sector * (sb->s_blocksize >> 9); - bio_add_page(bio, page, PAGE_SIZE, 0); + __bio_add_page(bio, page, PAGE_SIZE, 0); bio->bi_end_io = end_bio_io_page; bio->bi_private = page;