From patchwork Wed Mar 29 17:05:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Thumshirn X-Patchwork-Id: 13192958 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 0800FC74A5B for ; Wed, 29 Mar 2023 17:06:49 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 89202280002; Wed, 29 Mar 2023 13:06:49 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 81B42280001; Wed, 29 Mar 2023 13:06:49 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 66DFC280002; Wed, 29 Mar 2023 13:06:49 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 52090280001 for ; Wed, 29 Mar 2023 13:06:49 -0400 (EDT) Received: from smtpin22.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 31630140C24 for ; Wed, 29 Mar 2023 17:06:49 +0000 (UTC) X-FDA: 80622565338.22.29A7ABB Received: from esa6.hgst.iphmx.com (esa6.hgst.iphmx.com [216.71.154.45]) by imf21.hostedemail.com (Postfix) with ESMTP id 18F5D1C0023 for ; Wed, 29 Mar 2023 17:06:46 +0000 (UTC) Authentication-Results: imf21.hostedemail.com; dkim=pass header.d=wdc.com header.s=dkim.wdc.com header.b=UaUUt+qB; 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=1680109607; 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=x02oUNjO7QJjWY1PXTXGuNFM/HVTI0Li9/Hh3mHsQyc=; b=URM/clGoZkAxWFeLlFSoza5y/zffar3NJdGaQZXOTgy7NapXdV3TZrjNJzJaHet2xa3eUW 2/rK8PMPnkgnxqFoHKB/I8M0FunwsIRGisF6G9/8rR65pHFupMSertdHacWnINN8vx1sbT hbdBu6Kcl89+vBVrK2LMQy3ewXdjzlU= ARC-Authentication-Results: i=1; imf21.hostedemail.com; dkim=pass header.d=wdc.com header.s=dkim.wdc.com header.b=UaUUt+qB; 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=1680109607; a=rsa-sha256; cv=none; b=Oz+aFlakSIzEKl7IBqXpmto1dmJVuJpyvXmo7/70LvBUpr5fM3YaBQH+43Z2YpO6mEwiZQ D2wEQd/inSgyxouCt6b02+SgNuEnzIJJPQZPGDwB25kxunk1aPNq6+CYCuzSpGH6xnskrw VJg1i+YI1R5bJkkBapicaYUwkUUEhjI= DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1680109607; x=1711645607; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=k8CT487ce4SSO54vpXkhaUXbrl//N6dfoaIHSNrZXSc=; b=UaUUt+qBOdJCMMeUUf5gl9XP6Ls1GfDEHcYGL/grmoGQ+F+U85kTqyR0 lEjmbZuHFbCl6aJIcSCa3li8jm/geUjgX6J+gyw695Xg5WUFP9Pj0cKoo pBVh0wjcb9WMsIrlYUYDIMubavilKSFOANFmPZ2Q5lRiOhCW+peXLk114 mKPSO7rVljXu6A4EJgtz3AENMgaODexdL3X6oaof8rzeIPSbB37IeZX8a OmRMWP+C5OJCBFkq6dUbVN4YOqDcohBQMz7rn/5Lz6fI19jhXvH5QPyje 4n95Cq0aYnxhR9TAltjpSNE+dbtetqYiGWouIhM+/M9hWRMKGtFv3ddFN w==; X-IronPort-AV: E=Sophos;i="5.98,301,1673884800"; d="scan'208";a="226807058" 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:46 +0800 IronPort-SDR: 2eWV0nFau6TQACNIViYQSsNiI7hUafHcncA9rl3+CAHgq4cebv7Xj4KkgHVxRH3czQFziPiKZ/ KjJMNTvcGUJIq7C/zHtbiODXRyJRQOZcPD2S4I/bG8wz9t8fw8o8ZfUfYFkkcZshVbsVgawPYi VyUsvkw8v8aFsJmtiVBmWUpr8AoAZZ/7cYFvEG/azOKly0AD0eH1j3c3t67iXe4Ur9xJWfvWP6 sObwj08uJiHigMwe+pykz2wyfcbO8ARF3zaGOSgZcnCEEVO92fGKv7hZXrQPUqUl5pBQbjOGRi TgM= 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:22:56 -0700 IronPort-SDR: MOOXixcYEV1/J4lyBRhkoD3BrfkuwpVTjAnSNbGauDrQItggC4QoQ11Hy/5dh8cwJqG4TR0IkO Lnow8+4PjvklzXGKvuMnewjdhwfoe2RXCWLLrlvUTUex+DEDozd3vEEbQbLHW3vObVIOGbX5+L 9twd+og8XKgLZTmhzd7AQK5yODOqOEQMLfsU73Gxn69Zp7ZgBbmVcFqWvAs2LM4xS7ajmwhg/x f+DcHorKiciGGPhCff17T/c0ZTt7hWf/JGR8UxngNwnUUQ1TMJefX0ET3IFIG0c8MJgSPEpX7y R+E= 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:45 -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 09/19] btrfs: raid56: use __bio_add_page to add single page Date: Wed, 29 Mar 2023 10:05:55 -0700 Message-Id: <5ce38530bc488f9d4f1692d701ca7ad5ea8ca3e9.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: 18F5D1C0023 X-Stat-Signature: yjd9qsmao4c1cygaojz7auq8muc6x63m X-Rspam-User: X-HE-Tag: 1680109606-685504 X-HE-Meta: U2FsdGVkX1+kAPzGL7UiaPZXH1emiPY3+pZnVL4qx95YbD9qmse8j1xb5BZbCdY6bIAf7cUrkyKeYyMSlKSIg7XewTEKTUCcRkLfTzGkhfhIPgT3yf61HqJHFUB5tPWXmApjPiLlp5JOIl02AMxXM5sOJ2I9xqOm6sdJto750UMxELcc+OEBaYXx0HinnXEx5pu5VnFXyRTmc+mJ9edARUHjlxdEQcGOAACjgULBOq/KeEM2ZdPX1WK1qALEhqiZivrQ9rEwT7icm5aIgOybofxubU17x+sT8E90FGMuqDVnD+AnztYJq1pfgeGZ959SeO7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l7A0AILt4so45SJi 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 btrfs raid58 sector submission 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/btrfs/raid56.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/btrfs/raid56.c b/fs/btrfs/raid56.c index 642828c1b299..c8173e003df6 100644 --- a/fs/btrfs/raid56.c +++ b/fs/btrfs/raid56.c @@ -1108,7 +1108,7 @@ static int rbio_add_io_sector(struct btrfs_raid_bio *rbio, bio->bi_iter.bi_sector = disk_start >> 9; bio->bi_private = rbio; - bio_add_page(bio, sector->page, sectorsize, sector->pgoff); + __bio_add_page(bio, sector->page, sectorsize, sector->pgoff); bio_list_add(bio_list, bio); return 0; }