From patchwork Wed Mar 29 17:05:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Thumshirn X-Patchwork-Id: 13192960 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 07072C6FD18 for ; Wed, 29 Mar 2023 17:06:56 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 97F2B280004; Wed, 29 Mar 2023 13:06:55 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 9054E280001; Wed, 29 Mar 2023 13:06:55 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 77EDD280004; Wed, 29 Mar 2023 13:06:55 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 62B81280001 for ; Wed, 29 Mar 2023 13:06:55 -0400 (EDT) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 01097C0C5C for ; Wed, 29 Mar 2023 17:06:54 +0000 (UTC) X-FDA: 80622565548.16.3E6D119 Received: from esa6.hgst.iphmx.com (esa6.hgst.iphmx.com [216.71.154.45]) by imf21.hostedemail.com (Postfix) with ESMTP id BB7341C001D for ; Wed, 29 Mar 2023 17:06:52 +0000 (UTC) Authentication-Results: imf21.hostedemail.com; dkim=pass header.d=wdc.com header.s=dkim.wdc.com header.b=gx56qiXJ; 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=1680109613; 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=5iM0jkMwf+j1C5SPj7cNdROueGq/ObRXRJctwpKvjL8=; b=UowfMzCNoPIfKHIqloRHzyJZL7PeAvv6eGtL/qWE0CB4qxuzQe+QnaV6EHkpWI0TGI0OUG jvCJArickMv10iW97x7MjKmLTRs+5nS7Pd+41vepxpgD8Pz+vAHjyMomtnk9ypLPlNUaTV o7OmexkdTgVkUZgiiVLshwuIuCIHims= ARC-Authentication-Results: i=1; imf21.hostedemail.com; dkim=pass header.d=wdc.com header.s=dkim.wdc.com header.b=gx56qiXJ; 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=1680109613; a=rsa-sha256; cv=none; b=VyH80GSTCHZTt/NdqblC2fiQFi7rXzYx1jQ2ICqPPJgLjVnL9Ru1LWYz2kl39YX5WJbQjO GhRU/MKT5L8i3TZBOn5AWVRj99nBRPfB29BXBGPyGjh0f7C3CHIZYuTT9U4SRVM23DuKvi d9F5kVeRckyHTwqM0FiuOAxm7pVRRQE= DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1680109612; x=1711645612; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=HVSOyDSmhD70Nv/fkBkDeTGlq4JItHI/qNc4UYNza9Y=; b=gx56qiXJSUySh/uF5RXIflgjm+kw2mHS+lFpozEyx13tZx2bnTQABsW2 pDLglHbp4/a4mHBG8BV+9YiuXLsuA9cVATGj9DYSS/DA4jIlYo4cL5XIP rkx1YH4bf8dCsz6Hp5rJqhgr53W5x1zkNeGAUDgg6HDA0XvQ6S4xw9Q3d egBuHTRBFIFTnzbTwkC4Jkg0reTXmcDT7z4c1eSWkThauZhc5HgRhLM94 WI78+252C81DwJPzImwuPFHeSwOFV7USYSw0vKzP6FOzx/n+u9ATMwKhv Sw7xKy0oXPoqsvYlsPyABMoOyRKKakLVRynwIseJs5WRAFFbF8GB+TS3k w==; X-IronPort-AV: E=Sophos;i="5.98,301,1673884800"; d="scan'208";a="226807071" 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:06:52 +0800 IronPort-SDR: JP9Gm8ywVMaiEvr/a9f2fQfZtgMbSMlBlWI3ob5WFjAPE2tovFPPROOlpP7k1+xC1ZC0FpSyHB P8CKDIluIaTUep4xXRZ2l/TqFKV+HdnRCmDX4+ukn++2tB10rDO55FImOMwhARH3b78eAWHHSG /frFJKC1Pi09I0hfQPvguDQjqk1Gxe4E1qqdAQm8lVEDA3o8QKD8nFDQhwADtAfPpUzfyfkZQv Z9ox6S2jR7zHw3Q7xjyiqzHNIwaCI8UKNxotBcbjKSiSXy+30tIqviP9ARfccqZOZfFnRnHbEp hNA= 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:01 -0700 IronPort-SDR: BQgCe592q5M7/+hA4h11/kqfHityq5CvcyPS2rBc00hC4byMFoMSONh7xRqYNa59BKcDsROUUt MTkgPvmq53Jx71bmK390FtI6XSqL4/k6hBD0d81URBbk3Tt/Bm6YA0CRTta2rw15YqZZnZQclD 83BsLqej3Hs6EnxH5F5Dgte4ie6E3NSwc71KxqXcfciRA6bA8kvbBkRQZrz0pjrsGYBhyfiXmH Sm7ISx3Sy7yOK8htnsoXxQlu9j3TpCWlBVFzghrqQFDWQ1hiGWMf+dYL6Bi+aoFos5RsnY2nEB 30k= 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:06:51 -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 11/19] gfs: use __bio_add_page for adding single page to bio Date: Wed, 29 Mar 2023 10:05:57 -0700 Message-Id: <51e47d746d16221473851e06f86b5d90a904f41d.1680108414.git.johannes.thumshirn@wdc.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: BB7341C001D X-Stat-Signature: r387uhicehdni1pj6qadc9je6opmkzaj X-Rspam-User: X-HE-Tag: 1680109612-95409 X-HE-Meta: U2FsdGVkX1+770vej5HvNRlSF+bvTYKI0e9DUY3yVZYVx3f3ojsXwBUA3KX4DQ+mA5ficl0PCC1B80nuZk3LrthHflgu+8TSNhKUdcuB5NxgwoxGOBBObooQe0Ws5wGbDHtr0RcxBDDxsddlb0ZjtJ3II75teqtaC1INYLc2alLUdryBQj4F4lQdipHmUAAZvomWV+BZrKI3eJIYfZeqHW0HfM9aSVr4aE+v4CUb+neSgEOv8Wg9NEbW6GmtDjciufH+b47++LDLwGnr+1+SINL27QstSu3Cs77hq1SNkAy2mGusTXmeg0VBTh+cv4t98CC1xOKavR00n2z95w/CW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bogosity: 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;