From patchwork Tue May 2 10:19:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Thumshirn X-Patchwork-Id: 13229192 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 2D356C77B7E for ; Tue, 2 May 2023 17:07:45 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id AD4B86B0074; Tue, 2 May 2023 13:07:44 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A85686B0075; Tue, 2 May 2023 13:07:44 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 924EE6B0078; Tue, 2 May 2023 13:07:44 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 7DF076B0074 for ; Tue, 2 May 2023 13:07:44 -0400 (EDT) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id CD04BC0FF2 for ; Tue, 2 May 2023 15:14:13 +0000 (UTC) X-FDA: 80745660828.23.78DA8C9 Received: from esa2.hgst.iphmx.com (esa2.hgst.iphmx.com [68.232.143.124]) by imf19.hostedemail.com (Postfix) with ESMTP id 82D791A0065 for ; Tue, 2 May 2023 10:59:19 +0000 (UTC) Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=wdc.com header.s=dkim.wdc.com header.b=IDN0G5Sq; spf=pass (imf19.hostedemail.com: domain of "prvs=479dded8d=johannes.thumshirn@wdc.com" designates 68.232.143.124 as permitted sender) smtp.mailfrom="prvs=479dded8d=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=1683025160; 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=3h0oefEWpX3Zb4Sip5N1P853j2l/GeNnp4CXfPNK+d8=; b=KjSyPIOXaxMsptsFpohLZZKmbhWgvSW5JcHwESYzFnoCjRw8JB3a0q5SLleANZItDSduX6 NbC8a0JbR/YN6bIxgmNNnMEzhlr1VfJBH+NZ/XbX+3sUWgWlrzXqtn/Ee4gfEARl6O1pMz OVhh+zrwOpTwOwi8/DvUJ+pztfObUwg= ARC-Authentication-Results: i=1; imf19.hostedemail.com; dkim=pass header.d=wdc.com header.s=dkim.wdc.com header.b=IDN0G5Sq; spf=pass (imf19.hostedemail.com: domain of "prvs=479dded8d=johannes.thumshirn@wdc.com" designates 68.232.143.124 as permitted sender) smtp.mailfrom="prvs=479dded8d=johannes.thumshirn@wdc.com"; dmarc=pass (policy=quarantine) header.from=wdc.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1683025160; a=rsa-sha256; cv=none; b=RcLob9YI9rdtx79WnD0Kf25G1dAED87djTto5VNX7BnuANrxg36lieI+n9Eymcv3QgXq3X EDXp4d1WUyzvj/BESC3ZIygbcB+STbcr8Oueb9VpYDPArqc0Cj5xNS9FwzFch38/qg1AR+ rH59ESgF3ZDSeHGJoGaN07bmrxRpDXc= DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1683025161; x=1714561161; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=RNSKAHMvkQdyo+4c/AL7LVpo7PNOthlJkp/YVH+vRC0=; b=IDN0G5SqUOCIfO9gk390IxHUOrRj7kUL9j3cMj32bjLBtgr3nV9PqB4W FqPGyohwEV6jC+Zf4RY2FBLP1+lg13sFCEHFxQrr20v8l6BG+ttWNzCN8 2sDPUssPf29N2oF3wD6rjBEiPlGXRw7/xuQIrjsVkCYeWBnRh2FatQpXJ BCmUODy9hz/bVKdZcWOYKDwLVJGk+L29rnzLqRdyZ8dL6u6kaxjNWLUeZ DGFpnHQw7iLB3QCw7L9rSCag9Kjzyfx4FiYv/b8aF/RRCSSD4NZvWD1pV kz9eK1XhcsuR2BTVnukLK15eVhwiKe+R6xkEyJ/3KVoevZJWrDzUn5zjx Q==; X-IronPort-AV: E=Sophos;i="5.99,243,1677513600"; d="scan'208";a="334136192" 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; 02 May 2023 18:21:21 +0800 IronPort-SDR: H7Lid3qbyjK/KqgulPyBtl4s4wtDrkMXnngNAm+7XlSHMoFYLxwF75LKceBmFyqp4A6/TJ/9Lf khzeuuVZONT9jO8T5a/8ZWhRBltLrp8z65ijEiZMszFJIP6bMXjDApMoL0uXG6Fr5+HE9J3RnK Waa+Try3KesOuAr3iNu1Y7HALwjtu3YCbX5UhOZGMXQhVF0Q8QkOm6R5Ch7OHbyArfNbxFS0jQ bV5oyrIclMGp64KBisk/YCVlYeJg9hSwCk7OHchozU3TSILWaNPZ51w825QcFfLK16An4Wh39C HGM= 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:09 -0700 IronPort-SDR: OXftfXuzS/ylyqnOnxToR0e4rnrEE+M2SfxYzfUhqTVRY+geH2QOyPfDvF1cGkLL9mbJeyp2hq mdIqLtoGwBXeS5BfK4Z8vSFMEtEpYjMxerMUsh3kSYcWBq9PuNhF4VGLXxRmBwCd6wr8/QNqqs 4tRqp2Zxk4Qwc4ad1T4W2sP+crvnVDa5K20G/IUHvqVpxEL7P4R/ByV2un4SIHzKx29Qilb89F qgu3l1IZBOG+QkdA+5gbyGPQWJMgjJxs0Ml9+xbzyuALTexLar2VhaNNoCD6dUf87J0wANr7pu JyY= 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:17 -0700 From: Johannes Thumshirn To: "axboe @ kernel . dk" Cc: agruenba@redhat.com, cluster-devel@redhat.com, damien.lemoal@wdc.com, dm-devel@redhat.com, hare@suse.de, hch@lst.de, jfs-discussion@lists.sourceforge.net, kch@nvidia.com, linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-raid@vger.kernel.org, ming.lei@redhat.com, rpeterso@redhat.com, shaggy@kernel.org, snitzer@kernel.org, song@kernel.org, willy@infradead.org, Johannes Thumshirn , Damien Le Moal Subject: [PATCH v5 10/20] zonefs: use __bio_add_page for adding single page to bio Date: Tue, 2 May 2023 12:19:24 +0200 Message-Id: <20230502101934.24901-11-johannes.thumshirn@wdc.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230502101934.24901-1-johannes.thumshirn@wdc.com> References: <20230502101934.24901-1-johannes.thumshirn@wdc.com> MIME-Version: 1.0 X-Rspam-User: X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: 82D791A0065 X-Stat-Signature: q1n87qyzimmg6s8oboim5p5ztrhgm4qd X-HE-Tag: 1683025159-662574 X-HE-Meta: U2FsdGVkX1+Iq7Q6sN+d3PnBj/fZlrRlHF6AADHtrjDCDai2ceM76MrCYMiwsovuN+EqKrXei1bQnSDaV+rcBocK+go1WDFSEvPDDrhiRSok3ekyik26J/Xpbc6k2Loqw7GHudpOEcnAGbtDYUJihVjaZg4+RczX1Dx6fz5v/tmlc/HiIElN+BE3aKjKgXWaW7Dq23RrFzVPvPZRSvMAebrUNBg1qNBFupmmpFjM6U10xMgyvgwfydnPIH1m2uTjGwqhrqk76Hsa8tw3Yquo3ZUKqmyyBdIH+e9wxITGaHmVUdhKDe+6KQ8kebomQ2qwLkEMb/Tnvu/bEOWrFXKVTxv8HKU2mKEilPkYXfGdJZLpfZ6T1lSwl8dy6M6WwQ5335ZsxfnPYepWGqFbmZVl825u4/OhapmlI6op48GOGPFq6nCdC0SWFYyEzo0MQfTHM9q8wAnHxbWgj8RMmD97nTK8GUZzWMplsJa1lZs4+zfrxu1TKlzyA48DvJPN861c/qER+Dlj4kzkGNHsUdgOOVan+WSNLTs4pjt+VdzjyTEBiuWZB8VqHGtbX5HLQ4l56AfbQrdDLn3bQ7VxAuhk+zYUyaxxchstq1wL34ooonZmLuMmuKJxnIW3c20TjFRhDnKU49Rqo4Yb5N1KxxB6e1nLV3sZNgSOYktfJrPlkqxEV2+6q3daKGe2iJ/cLtB0SipD4314Ue1ce4BaE87HTm1TtR5/kjQnz3mkuqO7QuGdymXZau/w7VsR9+rOaCMiq1Q1S3mpWKtgDfYjsSwLE5zqDCoOPyo2Ja1dTEzjyUBIF45TdrbJtwrKvgUGcnvDkiSHRBZbhvXjwrIICUobTEvjbwN3t25MnpVhZXxQL2pSRVZhMZzn4INdBRYGJAHGJYmmsz38UKbdKuGr+4Bg6Io2spZm68gb71hZdovi1OiJ+cc6wS3JTK8/7pq1PNuOLKpVdWHF4dQOODiQILF LD4e6HPK Uuxt7Coh4lxWULBJYVuCIUdpvvL6NMWAWB2JXhN3sFUkgHR+usO82XYN8nFfa2DaPBDg1x1mVzqzW7QyKCXriVRRZhXiAVjyyFsQtlM3tBvNXK6zJ0GqpmZnLyBlAF21Hga4E12hNnE0p9crS9ay8SIzJ9Zp+SPwspgU2Pp4hLi0RiFPifRvBOm8bNGA7FVYU+aNOIk3Girtgx+AYl4Iz3P2gx7JB8G5glw4t X-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 zonefs 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. Acked-by: Damien Le Moal Signed-off-by: Johannes Thumshirn --- fs/zonefs/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/zonefs/super.c b/fs/zonefs/super.c index 23b8b299c64e..9350221abfc5 100644 --- a/fs/zonefs/super.c +++ b/fs/zonefs/super.c @@ -1128,7 +1128,7 @@ static int zonefs_read_super(struct super_block *sb) bio_init(&bio, sb->s_bdev, &bio_vec, 1, REQ_OP_READ); bio.bi_iter.bi_sector = 0; - bio_add_page(&bio, page, PAGE_SIZE, 0); + __bio_add_page(&bio, page, PAGE_SIZE, 0); ret = submit_bio_wait(&bio); if (ret)