From patchwork Tue May 30 15:49:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Thumshirn X-Patchwork-Id: 13260556 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 BB749C7EE32 for ; Tue, 30 May 2023 15:50:01 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id CC72A90000D; Tue, 30 May 2023 11:50:00 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C78CE900005; Tue, 30 May 2023 11:50:00 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id ACA1390000D; Tue, 30 May 2023 11:50:00 -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 8B074900005 for ; Tue, 30 May 2023 11:50:00 -0400 (EDT) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 4E57A402B7 for ; Tue, 30 May 2023 15:50:00 +0000 (UTC) X-FDA: 80847357360.06.1CE8E9E Received: from esa2.hgst.iphmx.com (esa2.hgst.iphmx.com [68.232.143.124]) by imf29.hostedemail.com (Postfix) with ESMTP id 3358C12001F for ; Tue, 30 May 2023 15:49:57 +0000 (UTC) Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=wdc.com header.s=dkim.wdc.com header.b=hD2UaNDg; spf=pass (imf29.hostedemail.com: domain of "prvs=507b913ec=johannes.thumshirn@wdc.com" designates 68.232.143.124 as permitted sender) smtp.mailfrom="prvs=507b913ec=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=1685461798; 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=Gby16rdkQKJc35hmFAlcZKrX7L3pd6WhaSEu0owJcMM=; b=KYoqolaVbQiQIW47piMBRQfyaGTD1ElbxlUG3iDc4o4HAHPth4ZyoEidECGhf0fl3YzYu7 NBq3EkD9QpyV4byrAHEm6THfd6YxC0yc7AnXwngIGm65D3BDRUA/d+jLvDxvCop00u2l3I lHY3fazNJQtM+6Okpfe+tGePKzRDAg0= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1685461798; a=rsa-sha256; cv=none; b=UiKG8eXy2qUlpM4VjxENjovE8tvPHShWrFASN0ZWTAliNZSdvEbIXqbqcb+EQDnPgl++dQ zRbo3nkbBlds/MKQ0xPHJIbgDcks89VrAPL6cJpjley/GssP3q33+gPodWMBDVlpzRXxzj Slm+EOUf1S0+TZfSCD0WzjuL7q8tzHw= ARC-Authentication-Results: i=1; imf29.hostedemail.com; dkim=pass header.d=wdc.com header.s=dkim.wdc.com header.b=hD2UaNDg; spf=pass (imf29.hostedemail.com: domain of "prvs=507b913ec=johannes.thumshirn@wdc.com" designates 68.232.143.124 as permitted sender) smtp.mailfrom="prvs=507b913ec=johannes.thumshirn@wdc.com"; dmarc=pass (policy=quarantine) header.from=wdc.com DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1685461798; x=1716997798; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=k4Zj5ateI81PgQX8IcVmz/ho3EHE64HEcz5aupY7/XQ=; b=hD2UaNDgC9YzkvDWStaT0Z7F8cfWtUX8Q+KnOIFwNU6LUeqtezNnqA7i inCUstOWKq6hBIz1qqAgVQvV+kb83FuQFihSSrJvSFIjL7vaQmUnpCDzv OJddAAdoC70zlNP467K95hyUrn5110VhVCbpudcFNR2mz6/UVBrBU7aQI JWhNds67MSR65/9OJ+pSUw6bF8waZv4WtYfLmNVXyzFDYLBLaVxLSIN/8 VVMgGE2pUBkEji+3u7evE87N9P/iKllZooQtPR2uhJRbwsrtUCR93NpUW WOBsltfeKIOrp+o1fsjznt1Tyoo3D/4moftbgzlCUrWI1KXiZdOX0YoIO A==; X-IronPort-AV: E=Sophos;i="6.00,204,1681142400"; d="scan'208";a="336465972" 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 May 2023 23:49:56 +0800 IronPort-SDR: prvcw1+hgFYgEux+axWF+8pby6ZhprxGH+eA0MlCeW7MOhsydJ29dJxpElVUL3i/6lz33JNYIH JVEAvW5xxBsli/aYBfI6Ujmw75ooOtIpLJ8GTglfB/F/jwBm2WdFcy/9zoU8B82Hlx3W1qApUA 9FkyxC2tINkTxEKjYHKq2PLdI7i/vE9JBIHvQobW4dhQw8dz3PYG1vIEq2MP7bltOjKImar8mC 7n0QDGzpsrjXACv4gHc8dKWoGt97WpRvmRmM4wXaslh0vtJ37O6fg4kIEUs8bNIlDIyjQ1hG/S S7E= 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; 30 May 2023 07:59:09 -0700 IronPort-SDR: syhtlBwgzrZqo2FxlZ+3+3UNQOSy9KOrXWDC7tRnbhEDdQ7M+iJ8X9kfYPjunQnyzAJ/BUunY7 TJFCtDpOg2F5DZ15LsnpaT3Bwo2hrn6uLSc+fNqG13pjWmrx9wooa6bynhnNQMlDHsy2Hk38NM QrDHnT8XkrjMZUyM4mGcFvGUGlEisF2RVaO8OEk9Qwnu8PpGMQpoWoaS1QquWy7J7yXqddyE5U EJEo3uszMCInYfCLIryejOvT01pFM14+/21EyuCsYg0N/wZvR8GfT4QE1m8ln383WoalorxH4j QYQ= WDCIronportException: Internal Received: from unknown (HELO redsun91.ssa.fujisawa.hgst.com) ([10.149.66.6]) by uls-op-cesaip02.wdc.com with ESMTP; 30 May 2023 08:49:54 -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 , Mikulas Patocka , gouhao@uniontech.com, Johannes Thumshirn , Damien Le Moal Subject: [PATCH v6 09/20] gfs2: use __bio_add_page for adding single page to bio Date: Tue, 30 May 2023 08:49:12 -0700 Message-Id: <15cfecbbac931aa18bfd89cede85bcde1d6edd77.1685461490.git.johannes.thumshirn@wdc.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: References: MIME-Version: 1.0 X-Rspamd-Queue-Id: 3358C12001F X-Rspam-User: X-Stat-Signature: p1d59ss4og3kqmxqc7f3xmgqf41yubyd X-Rspamd-Server: rspam03 X-HE-Tag: 1685461797-533532 X-HE-Meta: U2FsdGVkX19uEYOyqHUbT3u1pcvW+Qct7KY/BS2mKCLLMgFc3E7uuuqmNVxJw14/XCMc4YLrBR3v87bpoZRXJKjJJgkwzOfjUqzP4Fbt+B/qAYWHoh0LMrvvhXN4ws3l6g37NBiJT8SL0u+mPC8tfdF2zmx7nZNovvZIw80T8eVmoNkgExrpIwgZEf+whAL+ZKjQgMXLmSxWULUFCLShLly54nj4MBRY7aRlwuCH5gLur02UEYrGUNPjTWaA2tJqHO4KmdV/EdSpty1spzMK1wIRBahOKCZlyv8kTE3UYgzvbW24YFbi02jvj3fkabtJ1tQAZymltfol+iiDLMPSCuaGfaMoaNVZK+kmV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spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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 Reviewed-by: Christoph Hellwig --- 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;