From patchwork Wed May 31 11:50:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Thumshirn X-Patchwork-Id: 13262047 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 E3D60C7EE32 for ; Wed, 31 May 2023 11:51:22 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 55D8E6B0096; Wed, 31 May 2023 07:51:22 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 50DA26B0098; Wed, 31 May 2023 07:51:22 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3D58C8E0002; Wed, 31 May 2023 07:51:22 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 2D7F56B0096 for ; Wed, 31 May 2023 07:51:22 -0400 (EDT) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 0536180368 for ; Wed, 31 May 2023 11:51:21 +0000 (UTC) X-FDA: 80850384804.11.7C41316 Received: from esa4.hgst.iphmx.com (esa4.hgst.iphmx.com [216.71.154.42]) by imf10.hostedemail.com (Postfix) with ESMTP id 16267C0021 for ; Wed, 31 May 2023 11:51:19 +0000 (UTC) Authentication-Results: imf10.hostedemail.com; dkim=pass header.d=wdc.com header.s=dkim.wdc.com header.b=WM0knnXa; dmarc=pass (policy=quarantine) header.from=wdc.com; spf=pass (imf10.hostedemail.com: domain of "prvs=508ef2a02=johannes.thumshirn@wdc.com" designates 216.71.154.42 as permitted sender) smtp.mailfrom="prvs=508ef2a02=johannes.thumshirn@wdc.com" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1685533880; 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=3B5ABvvBy0IkS9bGCRSeasVhzt4B/CsILKGKfAmCjv4=; b=kaRCqaJemZmdDNtcJWl1WtNAGp+GUKVpG9xlweIjIDLnLYAP8kx7H16aMPy66uuZ2RLLJP armAIu2/PIkiycb1Zu6xKtuz0fS0u8AKXVhZOCPQ4nMhzcCSYBIxF4D6RWzh75sVchsNca geSz7ZYv6OBpk5Fyat/aBPlFVnugM+Q= ARC-Authentication-Results: i=1; imf10.hostedemail.com; dkim=pass header.d=wdc.com header.s=dkim.wdc.com header.b=WM0knnXa; dmarc=pass (policy=quarantine) header.from=wdc.com; spf=pass (imf10.hostedemail.com: domain of "prvs=508ef2a02=johannes.thumshirn@wdc.com" designates 216.71.154.42 as permitted sender) smtp.mailfrom="prvs=508ef2a02=johannes.thumshirn@wdc.com" ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1685533880; a=rsa-sha256; cv=none; b=RmytMHCS4Uk79rbxCvlRjACb5d5STjNGG/uj54Ce5rsZ9yiuIA4KeFhLqGp7UNpXKn9b5r NKggjir9I5ae3O1TPGotq6PanKv1UqWCRu9RWuCBh8gecU5HZCtQZI/s8Slav/blLDkXBa dvyEJRbr3kO/rwTW0seresHDqudHW0g= DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1685533879; x=1717069879; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=cSkd5AssBzijA2arQQJ/jDabPq82unQrdrIRPZntKD8=; b=WM0knnXapAC5feO/S6h81xnNNM3waEoDY9O2nv1/nCSxQfm9wl3v1hsD qZAclJAlfC7mNzFzQ9fYn/4UqHWL+Lt/1SdO2mj7W24O+UXmtrbkDGMwc yOowkR8YpDRpn++Q0KSxZNr+qAg0fjmM5aQRiFRvmGY4+8jyp8gvIUsgQ VIJG0mijlPYEVGcCsaRHHlh6IYlprj/wIzcOg2+xaGG0+CNareX6VfsGY hBJy5n/pYY+lWPWKOv3zhTAI1a/LEfBsNpnM+qHcKF/S7ZtzvtaGHOUdJ jm0FP+UwgKGViQqAMWgTAAP+k2eIVASjgaOZGFZSI/fvGBQRVbmAkmlnY Q==; X-IronPort-AV: E=Sophos;i="6.00,207,1681142400"; d="scan'208";a="230207429" 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; 31 May 2023 19:51:19 +0800 IronPort-SDR: JyT8p9e6qMJFSXPp3eXeKMCWprqId/LwWqX0Ky7bORANip7SnUQ2vwj0j5YGNOBpEv9iLuV31C PWvG4T5omOBs33iYDalDequdr3eMQSFeDMGo0MNICLdHEtc38B4HqBuqRyanUKsAaVspYZp2eX jFHkHa3WPXZ84/peJckBcUfwnGMG1Aepn0SDPDRwnmIegWaXUAMnUmye3uezeRblrcCQhdJpSK ZhkuncZdSchrBEdFu8EAALkEf36ScYLgwZ9nfuE4T7LMQRVPZyQ8OcerE8EeZKsZjWVtOdQBUh HGs= Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 31 May 2023 04:06:12 -0700 IronPort-SDR: JnJbKILHB8Hx67SEZIIpe1y6Cfe/bqIgfbZm4SN6soCmKZu0UJsjeqJfDfsm9CfmXDkQbCKFO8 YsXT66muLI4R3ZWh6EvCz+i6T7UJutXo9MG/o9yRxEJcrRvYstuAWlEz2tMVsgpBX0tLGYQh7B kQ8Kflt+H5RbvfNj5NAtdJNflZq2RxUBDL/5aMLyld+sYxFLoDJQXfDCGd4s6JHXPT2Avp5goJ MkE8t0T95Q1EaWVnN8BYTTgeHfpax769+8hNJ/WqPxGkEOmGHA6NOSa2mV2CJ2fxNtJg3AkHmF 54c= WDCIronportException: Internal Received: from unknown (HELO redsun91.ssa.fujisawa.hgst.com) ([10.149.66.6]) by uls-op-cesaip02.wdc.com with ESMTP; 31 May 2023 04:51:17 -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 , gouha7@uniontech.com, Johannes Thumshirn , Damien Le Moal Subject: [PATCH v7 09/20] gfs2: use __bio_add_page for adding single page to bio Date: Wed, 31 May 2023 04:50:32 -0700 Message-Id: <087c67d4e4973f949d3519c1e4822784ce583c5a.1685532726.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: 16267C0021 X-Rspam-User: X-Rspamd-Server: rspam04 X-Stat-Signature: 8tbsb3myrkpsheezji8h7kypygy13kmz X-HE-Tag: 1685533879-207193 X-HE-Meta: U2FsdGVkX1+CR5LmH3RXjo+MGlZB/3dxvd6epl/Dmf1xP2qFQ5C+N8MFW4/7xOcxiBf8aqE4OjZGex+7inAAQf1mDC72JkeXj1c6EsQYr53SSIFO7Tn9ONpwKvFsuX34plXWdghXSp7E3a2JqqUa8kBhQnpugi9heE/u0zd+yTs2yGQhGnfJZyeVw5e2BIqE6PtccqodXFR/VPdMI4bNprSTYy22u5oB1gdwibcsU6s6K4CAn1jAMBwqUVIszcmd7nWBY88BEehf6JeKjzYMd0WYX0mNfrMydCgLdbgm/mSCcswkxbNKdIdnXIJH1JpmTXVrMd6Bc/Vr0i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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 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 Reviewed-by: Christoph Hellwig 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;