From patchwork Wed Mar 15 12:32:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pankaj Raghav X-Patchwork-Id: 13175778 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 D31BEC61DA4 for ; Wed, 15 Mar 2023 12:32:44 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D59386B007B; Wed, 15 Mar 2023 08:32:42 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D2FFF6B007D; Wed, 15 Mar 2023 08:32:42 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BA9326B007E; Wed, 15 Mar 2023 08:32:42 -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 A16506B007B for ; Wed, 15 Mar 2023 08:32:42 -0400 (EDT) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 5D518AB4EB for ; Wed, 15 Mar 2023 12:32:42 +0000 (UTC) X-FDA: 80571071364.29.0854A32 Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by imf05.hostedemail.com (Postfix) with ESMTP id AA5A9100005 for ; Wed, 15 Mar 2023 12:32:39 +0000 (UTC) Authentication-Results: imf05.hostedemail.com; dkim=pass header.d=samsung.com header.s=mail20170921 header.b=ax8djDHz; spf=pass (imf05.hostedemail.com: domain of p.raghav@samsung.com designates 210.118.77.11 as permitted sender) smtp.mailfrom=p.raghav@samsung.com; dmarc=pass (policy=none) header.from=samsung.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1678883559; 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-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=xHtHdDL6PMtjzG/s1BTeKZDoZWNicuamGwZqbWGaFWY=; b=H5dROfeojCt7ysaODaZhRw0/09ZNj2MdxwBEi500JT9OdlbP71b+tKqSYAeurjGIkCvuLv keQP4Sq0Ss9fAKqODxZwY4ua5vrtqThKStYPUvMAraLfHZMIV3gT7OomhkRDHo8W+NTXsL aHa90mycJtRIhoqMXph7PchhemGDZQQ= ARC-Authentication-Results: i=1; imf05.hostedemail.com; dkim=pass header.d=samsung.com header.s=mail20170921 header.b=ax8djDHz; spf=pass (imf05.hostedemail.com: domain of p.raghav@samsung.com designates 210.118.77.11 as permitted sender) smtp.mailfrom=p.raghav@samsung.com; dmarc=pass (policy=none) header.from=samsung.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1678883559; a=rsa-sha256; cv=none; b=WSYj4wF2JReVQPqGCeAIE/EHtYiH9HCnqOb6URs9GtQoE8/dGBWuYOxN421TffjDBXepxz AsGcYZcPMU3wPbJlRjwLkZOdO3H+lUIPuYq8InBdnmYjDEiroMJifqOX+w7l9aIIydMzZz ftjYmNpLw5QBQIRX+MSMnLUMKWSBplI= Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20230315123237euoutp01a9616e146dfe9071e1a08713b12fd7be~Ml7NNi83_2672326723euoutp01D for ; Wed, 15 Mar 2023 12:32:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20230315123237euoutp01a9616e146dfe9071e1a08713b12fd7be~Ml7NNi83_2672326723euoutp01D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1678883557; bh=xHtHdDL6PMtjzG/s1BTeKZDoZWNicuamGwZqbWGaFWY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ax8djDHzSaL2h5KoBK8rAqoscnHFdpLvekOgdxRLNhFJdvc1CU+XEdZujT1yApZJr kHnV6wwVOwl4uP6Di2aFvMjU0yWRB0/YRhHvWMJMkZU4PxscvptOypNRqC1/Oq5eG0 I+iCVezVB6IDbnkfc2g2QIEUb7Cipw9xnaVVF8sE= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20230315123236eucas1p278affb4e64241546f64afed338efca1c~Ml7L6vXGB3026530265eucas1p21; Wed, 15 Mar 2023 12:32:36 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id 4F.70.09503.3EAB1146; Wed, 15 Mar 2023 12:32:35 +0000 (GMT) Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20230315123235eucas1p1bd62cb2aab435727880769f2e57624fd~Ml7LeOs-D2051320513eucas1p16; Wed, 15 Mar 2023 12:32:35 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp1.samsung.com (KnoxPortal) with ESMTP id 20230315123235eusmtrp1bdff96dbbe94408780a8ff5c68ddbd05~Ml7LdnDW41056310563eusmtrp1z; Wed, 15 Mar 2023 12:32:35 +0000 (GMT) X-AuditID: cbfec7f2-ea5ff7000000251f-1e-6411bae38811 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id AF.AF.09583.3EAB1146; Wed, 15 Mar 2023 12:32:35 +0000 (GMT) Received: from localhost (unknown [106.210.248.172]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20230315123235eusmtip2887f4bfaca2837bb071b662d96499d3a~Ml7LNopEC0183701837eusmtip2L; Wed, 15 Mar 2023 12:32:35 +0000 (GMT) From: Pankaj Raghav To: hubcap@omnibond.com, senozhatsky@chromium.org, martin@omnibond.com, willy@infradead.org, minchan@kernel.org, viro@zeniv.linux.org.uk, brauner@kernel.org, axboe@kernel.dk, akpm@linux-foundation.org Cc: linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, gost.dev@samsung.com, mcgrof@kernel.org, devel@lists.orangefs.org, Pankaj Raghav Subject: [RFC PATCH 2/3] mpage: use bio_for_each_folio_all in mpage_end_io() Date: Wed, 15 Mar 2023 13:32:32 +0100 Message-Id: <20230315123233.121593-3-p.raghav@samsung.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230315123233.121593-1-p.raghav@samsung.com> MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrLKsWRmVeSWpSXmKPExsWy7djP87qPdwmmGGzdY2ExZ/0aNovVd/vZ LF4f/sRosX/zFCaLmwd2Mlm03+1jsth7S9tiz96TLBaXd81hs7i35j+rxcn1/5ktbkx4ymix 7Ot7dovPS1vYLXZvXMRmcf7vcVaL3z/msDkIesxuuMjisXmFlsfls6Uem1Z1snls+jSJ3ePE jN8sHg1Tb7F5/Lp9h9Wjb8sqRo/Pm+Q8Nj15yxTAHcVlk5Kak1mWWqRvl8CVsbjnHGtBE3tF 59mrjA2Md1i7GDk5JARMJF4c3MrcxcjFISSwglHiadNeNgjnC6NE55857BDOZ0aJJ33Pgco4 wFpOvTKHiC9nlNi9+h1U0UtGiYbrm1hAitgEtCQaO8HiIgJngJpbJoKNZRa4zyhxvek3O8hy YQEfie+LrzOB2CwCqhKvvu9gBrF5BawkbuxYwQRxoLzE/oNnweKcAtYSq1dOZ4OoEZQ4OfMJ C4jNDFTTvHU22BMSAqs5JW5uWgT1nYvE5O9XWSBsYYlXx7ewQ9gyEqcn90DFqyWe3vgN1dzC KNG/cz0bxJ/WEn1nckBMZgFNifW79CHKHSU2LZrCClHBJ3HjrSDECXwSk7ZNhw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ANnBzCAj4S3xdfZwKxWQRUJV5938EMYvMKWEnc2LGCCWKDvMT+ g2fB4pwC1hKrV04Hu0IIqOb+vV1MEPWCEidnPmEBsZmB6pu3zmaewCgwC0lqFpLUAkamVYwi qaXFuem5xUZ6xYm5xaV56XrJ+bmbGIHxuu3Yzy07GFe++qh3iJGJg/EQowQHs5IIbziLQIoQ b0piZVVqUX58UWlOavEhRlOguycyS4km5wMTRl5JvKGZgamhiZmlgamlmbGSOK9nQUeikEB6 YklqdmpqQWoRTB8TB6dUA5Ogrvrp7c5vJvz2W8954tbK9U2WAsxGDS/s2TfMZdBYeGt6+xd3 7ZUvZS4oL5k5uZV7nhKD7Q++AqVn6kUMfjvT+Qze8L64vyr7ecq6ok9ruosD1+7aVpiSlv9I 8+vLvSn9wf2SSYrzfxvyesXOmeGlZCKY1XDGQFKwfUp82/y4XDaNQ63b1+tuerWqePKTW/c9 UzSSyqV3HFEOn10nd9Byo03tifUST1/5va0Xc/57W7XuED/3ksUMh01vN5a7aAavFmzbdOSW b2OYW8w33ugJp3fOXbdlBqtWJMsGfbGfobssDRT3MXttu9YQlDthWWXUlftH9nje4X3DIdnk 76vPyjurtO5ChbB54b1Zt5RYijMSDbWYi4oTARrtJ/1gAwAA X-CMS-MailID: 20230315123235eucas1p1bd62cb2aab435727880769f2e57624fd X-Msg-Generator: CA X-RootMTR: 20230315123235eucas1p1bd62cb2aab435727880769f2e57624fd X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20230315123235eucas1p1bd62cb2aab435727880769f2e57624fd References: <20230315123233.121593-1-p.raghav@samsung.com> X-Rspam-User: X-Rspamd-Server: rspam03 X-Stat-Signature: b87jqdby4kzzua5grbafxnqeax86gft9 X-Rspamd-Queue-Id: AA5A9100005 X-HE-Tag: 1678883559-575327 X-HE-Meta: U2FsdGVkX18uxTWNwa1jbM3jzQ2bH0j/X6jPIBXpZfUmwRzVPqlwaE4s71OfIGZt3rwRVw5innUBjZQnnvwGvlHJJpJvsvjo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000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Use bio_for_each_folio_all to iterate through folios in a bio so that the folios can be directly passed to the folio_endio() function. Signed-off-by: Pankaj Raghav Reviewed-by: Luis Chamberlain --- fs/mpage.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/fs/mpage.c b/fs/mpage.c index 40e86e839e77..bfcc139938a8 100644 --- a/fs/mpage.c +++ b/fs/mpage.c @@ -45,14 +45,11 @@ */ static void mpage_end_io(struct bio *bio) { - struct bio_vec *bv; - struct bvec_iter_all iter_all; + struct folio_iter fi; - bio_for_each_segment_all(bv, bio, iter_all) { - struct page *page = bv->bv_page; - folio_endio(page_folio(page), bio_op(bio), - blk_status_to_errno(bio->bi_status)); - } + bio_for_each_folio_all(fi, bio) + folio_endio(fi.folio, bio_op(bio), + blk_status_to_errno(bio->bi_status)); bio_put(bio); }