From patchwork Tue May 2 10:19:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Thumshirn X-Patchwork-Id: 13228681 X-Patchwork-Delegate: snitzer@redhat.com 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 us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0B7D4C77B7E for ; Tue, 2 May 2023 10:21:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1683022884; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=+TnyXczawaE3CV2kjKHqgVQkVXHrnpvozZI1byIQG7M=; b=bJb+QbELSvw370FJ24APu0DXdKiC4sGaMviY13wln5khXNofOSbzr90gcDzHxvfxN0ac0D xlu06lwgWXEqkJ0nbbhmmPGtbb+jiVtcSuKOBd4t6gpcEIunroi1KWo/fJ0xo6xQbyJwUT 497oFzTKkC085taRtCF5t7EPxHtdW64= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-46-cJQa2jqgPMOIIebgt9HEnQ-1; Tue, 02 May 2023 06:21:22 -0400 X-MC-Unique: cJQa2jqgPMOIIebgt9HEnQ-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id F35D0381494C; Tue, 2 May 2023 10:21:20 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id DEC1B40C200A; Tue, 2 May 2023 10:21:20 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 9E24E19465B7; Tue, 2 May 2023 10:21:20 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 19020194658C for ; Tue, 2 May 2023 10:21:20 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 0B464C15BAE; Tue, 2 May 2023 10:21:20 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast01.extmail.prod.ext.rdu2.redhat.com [10.11.55.17]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 02BAEC15BAD for ; Tue, 2 May 2023 10:21:19 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id DB08B858F09 for ; Tue, 2 May 2023 10:21:19 +0000 (UTC) Received: from esa4.hgst.iphmx.com (esa4.hgst.iphmx.com [216.71.154.42]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-620-GgUmSgBaN065pOvShGto4w-2; Tue, 02 May 2023 06:21:18 -0400 X-MC-Unique: GgUmSgBaN065pOvShGto4w-2 X-IronPort-AV: E=Sophos;i="5.99,243,1677513600"; d="scan'208";a="227916265" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 02 May 2023 18:21:17 +0800 IronPort-SDR: gL4M0e7gRjcQm60cRhSTDkTh+fLBG/7cIwq1+8rB4HiqawQ8JWt9uTxbEntge8z0xLcXMC5F2W dPUNjD9XZqY76X5w81F41eC967nz8q2LgvCHRt6UGYMOKL99qqNNRHGkaIhEWdl/cwde89J6Nl MVxW3ZiQDsJcmpBWR71zpPFRcX2/Bz0/dpT0yuRuMldn8HVoB476ZnpMvm1RD8aXHiCKUmP/3M x4c/TuJ8OPWrOwgIm1WCWauffAtmZgGOvtUwSOVrcmO7pIidxcbFR1nwcg7yIS+ZHzGbAXub8+ /oQ= Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 02 May 2023 02:31:03 -0700 IronPort-SDR: 4QS0kxeAR11TAsjK3q6rHbu4+NZzJ/T6AbVXb55vKDbMM+oCblWAbUFs2YUG9KGIgOHq6CvJL6 XUwNm6KOwnm57J4RnjJo/YsJf7KQxoqDGhV11a0uPsyKLzme4AtvTwC+ST9Bmtyv86ntqEq4hc s99tUUKJH1Y54xjx3kIzWz1UZPM/tbIrLj/KWTho9Mx5xM2253HnCZK5jP5kww+0Kbc2uMt5Et jTuZjzyn9MCje8+jDXXIghxbJZq3kwbYIlwQW8gMVAhOzG05xOEF+r5ej7Dqx979eenILJzMIN mEY= WDCIronportException: Internal Received: from myd008205.ad.shared (HELO localhost.localdomain) ([10.225.1.100]) by uls-op-cesaip02.wdc.com with ESMTP; 02 May 2023 03:21:13 -0700 From: Johannes Thumshirn To: "axboe @ kernel . dk" Date: Tue, 2 May 2023 12:19:23 +0200 Message-Id: <20230502101934.24901-10-johannes.thumshirn@wdc.com> In-Reply-To: <20230502101934.24901-1-johannes.thumshirn@wdc.com> References: <20230502101934.24901-1-johannes.thumshirn@wdc.com> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 Subject: [dm-devel] [PATCH v5 09/20] gfs2: use __bio_add_page for adding single page to bio X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-block@vger.kernel.org, damien.lemoal@wdc.com, kch@nvidia.com, agruenba@redhat.com, shaggy@kernel.org, song@kernel.org, Johannes Thumshirn , Damien Le Moal , snitzer@kernel.org, jfs-discussion@lists.sourceforge.net, willy@infradead.org, ming.lei@redhat.com, cluster-devel@redhat.com, linux-mm@kvack.org, dm-devel@redhat.com, linux-fsdevel@vger.kernel.org, linux-raid@vger.kernel.org, hch@lst.de, rpeterso@redhat.com Errors-To: dm-devel-bounces@redhat.com Sender: "dm-devel" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: wdc.com The GFS2 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. Reviewed-by: Damien Le Moal Reviewed-by: Andreas Gruenbacher Signed-off-by: Johannes Thumshirn --- 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 9af9ddb61ca0..cd962985b058 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;