From patchwork Tue Mar 28 11:27:12 2023
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Pankaj Raghav
X-Patchwork-Id: 13190927
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 vger.kernel.org (vger.kernel.org [23.128.96.18])
by smtp.lore.kernel.org (Postfix) with ESMTP id DB947C77B60
for ; Tue, 28 Mar 2023 11:27:28 +0000 (UTC)
Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
id S230248AbjC1L11 (ORCPT );
Tue, 28 Mar 2023 07:27:27 -0400
Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42340 "EHLO
lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
with ESMTP id S229924AbjC1L10 (ORCPT
);
Tue, 28 Mar 2023 07:27:26 -0400
Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com
[210.118.77.11])
by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EF95F185
for ;
Tue, 28 Mar 2023 04:27:22 -0700 (PDT)
Received: from eucas1p2.samsung.com (unknown [182.198.249.207])
by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id
20230328112720euoutp017c0c652edeef1d35a96c9b06a445df80~Qka60P70-0345203452euoutp016
for ;
Tue, 28 Mar 2023 11:27:20 +0000 (GMT)
DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com
20230328112720euoutp017c0c652edeef1d35a96c9b06a445df80~Qka60P70-0345203452euoutp016
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com;
s=mail20170921; t=1680002840;
bh=V4uAY23rx6LbYgOeA+xAE8iXiLJZoHXfAuLkczsvSEk=;
h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
b=g693ybURzQsLeFqRIYnYKiIo8yQ5CSmuybp+IfxL5pizPUyGj5Xjvcc47ckjr6oE+
EZp90lFWAUo/dtTnIQq4K++4Nw8sJMVdCasU2R8ZIatq3y1Sdasl5IXoX/tb3BhFNt
2fdzj4sATJg3SRSu4rcTvDpIZF19GYjbawOxHtBY=
Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by
eucas1p2.samsung.com (KnoxPortal) with ESMTP id
20230328112718eucas1p2a740048df8ba642e0aa035d009115284~Qka5NmZGW2759927599eucas1p28;
Tue, 28 Mar 2023 11:27:18 +0000 (GMT)
Received: from eucas1p2.samsung.com ( [182.198.249.207]) by
eusmges1new.samsung.com (EUCPMTA) with SMTP id 34.51.09503.61FC2246;
Tue, 28
Mar 2023 12:27:18 +0100 (BST)
Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by
eucas1p2.samsung.com (KnoxPortal) with ESMTPA id
20230328112718eucas1p214a859cfb3d7b45523356bcc16c373b1~Qka44T5zZ0111901119eucas1p2j;
Tue, 28 Mar 2023 11:27:18 +0000 (GMT)
Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by
eusmtrp1.samsung.com (KnoxPortal) with ESMTP id
20230328112718eusmtrp16f41b0a32e8b05be0788a2ac4a06450a~Qka43kbO80876308763eusmtrp1S;
Tue, 28 Mar 2023 11:27:18 +0000 (GMT)
X-AuditID: cbfec7f2-e8fff7000000251f-78-6422cf16dae4
Received: from eusmtip2.samsung.com ( [203.254.199.222]) by
eusmgms1.samsung.com (EUCPMTA) with SMTP id FD.19.08862.61FC2246;
Tue, 28
Mar 2023 12:27:18 +0100 (BST)
Received: from localhost (unknown [106.210.248.108]) by eusmtip2.samsung.com
(KnoxPortal) with ESMTPA id
20230328112718eusmtip24e9e179b1b56e4e1504088728ba93515~Qka4o8oxA2590125901eusmtip29;
Tue, 28 Mar 2023 11:27:18 +0000 (GMT)
From: Pankaj Raghav
To: martin@omnibond.com, axboe@kernel.dk, minchan@kernel.org,
akpm@linux-foundation.org, hubcap@omnibond.com,
willy@infradead.org, viro@zeniv.linux.org.uk,
senozhatsky@chromium.org, brauner@kernel.org
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
mcgrof@kernel.org, linux-block@vger.kernel.org,
gost.dev@samsung.com, linux-mm@kvack.org, devel@lists.orangefs.org,
Pankaj Raghav
Subject: [PATCH 1/5] zram: remove the call to page_endio in the bio end_io
handler
Date: Tue, 28 Mar 2023 13:27:12 +0200
Message-Id: <20230328112716.50120-2-p.raghav@samsung.com>
X-Mailer: git-send-email 2.34.1
In-Reply-To: <20230328112716.50120-1-p.raghav@samsung.com>
MIME-Version: 1.0
X-Brightmail-Tracker:
H4sIAAAAAAAAA+NgFrrLKsWRmVeSWpSXmKPExsWy7djP87pi55VSDO5u0bWYs34Nm8Xqu/1s
Fq8Pf2K02L95CpPFzQM7mSza7/YxWey9pW2xZ+9JFovLu+awWdxb85/V4uT6/8wWNyY8ZbRY
9vU9u8XnpS3sFrs3LmKzOP/3OKvF7x9z2BwEPWY3XGTx2LxCy+Py2VKPTas62Tw2fZrE7nFi
xm8Wj4apt9g8ft2+w+rRt2UVo8fnTXIem568ZQrgjuKySUnNySxLLdK3S+DKWHXlNkvBae6K
x1MdGhjPcXYxcnJICJhIfFm2j72LkYtDSGAFo8SkB+vYIJwvjBKnts9ngXA+M0p86m1nhmk5
++EOVMtyRompb5ZDOS8ZJe43ngLq5+BgE9CSaOwEi4sInGGUWLy8EWwus8B9RolvL88zgYwS
FgiRmPNyKSuIzSKgKvF/wxl2EJtXwFLi5uZdrBDr5CX2HzzLDDKUU8BKYtpvK4gSQYmTM5+w
gNjMQCXNW2czg8yXEFjPKfHi4CdGiF4XiQdTf7BB2MISr45vYYewZSROT+5hgbCrJZ7e+A3V
3MIo0b9zPdgHEgLWEn1nckBMZgFNifW79CHKHSUeb9/JClHBJ3HjrSDECXwSk7ZNZ4YI80p0
tAlBVCtJ7Pz5BGqphMTlpjlQSz0kut6+Zp3AqDgLyTOzkDwzC2HvAkbmVYziqaXFuempxYZ5
qeV6xYm5xaV56XrJ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ktYCRaRWjSGpp
cW56brGhXnFibnFpXrpecn7uJkZgtG479nPzDsZ5rz7qHWJk4mA8xCjBwawkwrvZWzFFiDcl
sbIqtSg/vqg0J7X4EKMp0NkTmaVEk/OB6SKvJN7QzMDU0MTM0sDU0sxYSZzXs6AjUUggPbEk
NTs1tSC1CKaPiYNTqoHJRfDAQtvep+LeO8qrU7//Z11v5VD4/Offx9Yb3X4ffHM6/qpwX0LV
oQttD8xeebE1fPH7mcw87bx6RM+fWqb/LTH/5vAwyW74ql2xUNRb5Kqo17IXs/TtzTZd63uc
2ceyL0w4rLJZ3FpANqD64M3Le754C577/Ssp5pdt4s5gy8Alxi5HvS4aGpwM59m6Z/Op21r1
U1Q5ZGar5yhFc3TevFay6uzKpk/LAnf/mdb4YsG3uJ+d++63WWw4dHbTy8Jb03f/nSlgVLb/
bOyPE7NXXngvMe26p7qF6Z7bm9VK+M8u7HMW55+26N6xuVfyfV8dfXHzRitftIak7Sv+BbfZ
p8W33VtwetuJC7v6jyy5E6fEUpyRaKjFXFScCADMRL1hXwMAAA==
X-CMS-MailID: 20230328112718eucas1p214a859cfb3d7b45523356bcc16c373b1
X-Msg-Generator: CA
X-RootMTR: 20230328112718eucas1p214a859cfb3d7b45523356bcc16c373b1
X-EPHeader: CA
CMS-TYPE: 201P
X-CMS-RootMailID: 20230328112718eucas1p214a859cfb3d7b45523356bcc16c373b1
References: <20230328112716.50120-1-p.raghav@samsung.com>
Precedence: bulk
List-ID:
X-Mailing-List: linux-block@vger.kernel.org
zram_page_end_io function is called when alloc_page is used (for
partial IO) to trigger writeback from the user space. The pages used for
this operation is never locked or have the writeback set. So, it is safe
to remove the call to page_endio() function that unlocks or marks
writeback end on the page.
Rename the endio handler from zram_page_end_io to zram_read_end_io as
the call to page_endio() is removed and to associate the callback to the
operation it is used in.
Signed-off-by: Pankaj Raghav
---
drivers/block/zram/zram_drv.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
index b7bb52f8dfbd..3300e7eda2f6 100644
--- a/drivers/block/zram/zram_drv.c
+++ b/drivers/block/zram/zram_drv.c
@@ -606,12 +606,8 @@ static void free_block_bdev(struct zram *zram, unsigned long blk_idx)
atomic64_dec(&zram->stats.bd_count);
}
-static void zram_page_end_io(struct bio *bio)
+static void zram_read_end_io(struct bio *bio)
{
- struct page *page = bio_first_page_all(bio);
-
- page_endio(page, op_is_write(bio_op(bio)),
- blk_status_to_errno(bio->bi_status));
bio_put(bio);
}
@@ -635,7 +631,7 @@ static int read_from_bdev_async(struct zram *zram, struct bio_vec *bvec,
}
if (!parent)
- bio->bi_end_io = zram_page_end_io;
+ bio->bi_end_io = zram_read_end_io;
else
bio_chain(bio, parent);
From patchwork Tue Mar 28 11:27:13 2023
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Pankaj Raghav
X-Patchwork-Id: 13190929
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 vger.kernel.org (vger.kernel.org [23.128.96.18])
by smtp.lore.kernel.org (Postfix) with ESMTP id 49103C76195
for ; Tue, 28 Mar 2023 11:27:32 +0000 (UTC)
Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
id S231251AbjC1L13 (ORCPT );
Tue, 28 Mar 2023 07:27:29 -0400
Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42366 "EHLO
lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
with ESMTP id S230424AbjC1L11 (ORCPT
);
Tue, 28 Mar 2023 07:27:27 -0400
Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com
[210.118.77.12])
by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F04AE2D40
for ;
Tue, 28 Mar 2023 04:27:22 -0700 (PDT)
Received: from eucas1p1.samsung.com (unknown [182.198.249.206])
by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id
20230328112721euoutp0234fe2004332fcd0b6eae1f7c4cbde5b4~Qka7U8Z1-2992529925euoutp02h
for ;
Tue, 28 Mar 2023 11:27:21 +0000 (GMT)
DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com
20230328112721euoutp0234fe2004332fcd0b6eae1f7c4cbde5b4~Qka7U8Z1-2992529925euoutp02h
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com;
s=mail20170921; t=1680002841;
bh=CdQ/QAA4HUstxavQOVZ/jTlQypv2+dxHUXTfyjJfsFQ=;
h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
b=VlzGtKbKqfX+5cBNh5Hh7eQh+UnR46lbFD2VmnTOtRDIpE6gKEtgCRlBFqS2RIXKI
s7aYIGYbJplH+ki6LLrAEkWShD65oAX4NuiIKVfnxUopgZLDdbiZX6TZjLBCc5HkaO
2kjH53fd4S6va4PhcQ6VD62owlvOgtpt4UgtmNBI=
Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by
eucas1p1.samsung.com (KnoxPortal) with ESMTP id
20230328112719eucas1p10474fc62f4ae26a7ac767e7ac1743a89~Qka50krkB2133321333eucas1p1P;
Tue, 28 Mar 2023 11:27:19 +0000 (GMT)
Received: from eucas1p1.samsung.com ( [182.198.249.206]) by
eusmges2new.samsung.com (EUCPMTA) with SMTP id A8.01.09966.71FC2246;
Tue, 28
Mar 2023 12:27:19 +0100 (BST)
Received: from eusmtrp1.samsung.com (unknown [182.198.249.138]) by
eucas1p2.samsung.com (KnoxPortal) with ESMTPA id
20230328112718eucas1p263dacecb2a59f5fce510f81685f9d497~Qka5WYQr60534405344eucas1p2V;
Tue, 28 Mar 2023 11:27:18 +0000 (GMT)
Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by
eusmtrp1.samsung.com (KnoxPortal) with ESMTP id
20230328112718eusmtrp13eff014ff761dc9f74c78ad532d3ee62~Qka5VkdI00876308763eusmtrp1T;
Tue, 28 Mar 2023 11:27:18 +0000 (GMT)
X-AuditID: cbfec7f4-d39ff700000026ee-21-6422cf1759f9
Received: from eusmtip2.samsung.com ( [203.254.199.222]) by
eusmgms1.samsung.com (EUCPMTA) with SMTP id 1F.19.08862.61FC2246;
Tue, 28
Mar 2023 12:27:18 +0100 (BST)
Received: from localhost (unknown [106.210.248.108]) by eusmtip2.samsung.com
(KnoxPortal) with ESMTPA id
20230328112718eusmtip26b96643ca4ec913cd0e3480ce3a23477~Qka5JB9ZZ0051900519eusmtip2L;
Tue, 28 Mar 2023 11:27:18 +0000 (GMT)
From: Pankaj Raghav
To: martin@omnibond.com, axboe@kernel.dk, minchan@kernel.org,
akpm@linux-foundation.org, hubcap@omnibond.com,
willy@infradead.org, viro@zeniv.linux.org.uk,
senozhatsky@chromium.org, brauner@kernel.org
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
mcgrof@kernel.org, linux-block@vger.kernel.org,
gost.dev@samsung.com, linux-mm@kvack.org, devel@lists.orangefs.org,
Pankaj Raghav
Subject: [PATCH 2/5] orangefs: use folios in orangefs_readahead
Date: Tue, 28 Mar 2023 13:27:13 +0200
Message-Id: <20230328112716.50120-3-p.raghav@samsung.com>
X-Mailer: git-send-email 2.34.1
In-Reply-To: <20230328112716.50120-1-p.raghav@samsung.com>
MIME-Version: 1.0
X-Brightmail-Tracker:
H4sIAAAAAAAAA+NgFrrFKsWRmVeSWpSXmKPExsWy7djPc7ri55VSDJaeFbWYs34Nm8Xqu/1s
Fq8Pf2K02L95CpPFzQM7mSza7/YxWey9pW2xZ+9JFovLu+awWdxb85/V4uT6/8wWNyY8ZbRY
9vU9u8XnpS3sFrs3LmKzOP/3OKvF7x9z2BwEPWY3XGTx2LxCy+Py2VKPTas62Tw2fZrE7nFi
xm8Wj4apt9g8ft2+w+rRt2UVo8fnTXIem568ZQrgjuKySUnNySxLLdK3S+DKuLnsLmvBc86K
PSeOsjYw/mLvYuTk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fce510f81685f9d497
X-Msg-Generator: CA
X-RootMTR: 20230328112718eucas1p263dacecb2a59f5fce510f81685f9d497
X-EPHeader: CA
CMS-TYPE: 201P
X-CMS-RootMailID: 20230328112718eucas1p263dacecb2a59f5fce510f81685f9d497
References: <20230328112716.50120-1-p.raghav@samsung.com>
Precedence: bulk
List-ID:
X-Mailing-List: linux-block@vger.kernel.org
Convert orangefs_readahead() from using struct page to struct folio.
This conversion removes the call to page_endio() which is soon to be
removed, and simplifies the final page handling.
The page error flags is not required to be set in the error case as
orangefs doesn't depend on them.
Signed-off-by: Pankaj Raghav
Reviewed-by: Matthew Wilcox (Oracle)
---
fs/orangefs/inode.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/fs/orangefs/inode.c b/fs/orangefs/inode.c
index aefdf1d3be7c..9014bbcc8031 100644
--- a/fs/orangefs/inode.c
+++ b/fs/orangefs/inode.c
@@ -244,7 +244,7 @@ static void orangefs_readahead(struct readahead_control *rac)
struct iov_iter iter;
struct inode *inode = rac->mapping->host;
struct xarray *i_pages;
- struct page *page;
+ struct folio *folio;
loff_t new_start = readahead_pos(rac);
int ret;
size_t new_len = 0;
@@ -275,9 +275,10 @@ static void orangefs_readahead(struct readahead_control *rac)
ret = 0;
/* clean up. */
- while ((page = readahead_page(rac))) {
- page_endio(page, false, ret);
- put_page(page);
+ while ((folio = readahead_folio(rac))) {
+ if (!ret)
+ folio_mark_uptodate(folio);
+ folio_unlock(folio);
}
}
From patchwork Tue Mar 28 11:27:14 2023
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Pankaj Raghav
X-Patchwork-Id: 13190928
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 vger.kernel.org (vger.kernel.org [23.128.96.18])
by smtp.lore.kernel.org (Postfix) with ESMTP id B0F7AC77B6D
for ; Tue, 28 Mar 2023 11:27:29 +0000 (UTC)
Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
id S231978AbjC1L12 (ORCPT );
Tue, 28 Mar 2023 07:27:28 -0400
Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42342 "EHLO
lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
with ESMTP id S229935AbjC1L10 (ORCPT
);
Tue, 28 Mar 2023 07:27:26 -0400
Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com
[210.118.77.11])
by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F00661A7
for ;
Tue, 28 Mar 2023 04:27:22 -0700 (PDT)
Received: from eucas1p2.samsung.com (unknown [182.198.249.207])
by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id
20230328112721euoutp018332aea2760af90c59fe3c08ae1f4bed~Qka7_n_Nu0435404354euoutp01p
for ;
Tue, 28 Mar 2023 11:27:21 +0000 (GMT)
DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com
20230328112721euoutp018332aea2760af90c59fe3c08ae1f4bed~Qka7_n_Nu0435404354euoutp01p
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com;
s=mail20170921; t=1680002841;
bh=5/+0KaEbpjyZkaLqtYLBQz1+pPqkvr1OOiQOg6+VTQI=;
h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
b=X8veZPRUscTbo+csuyoBzJR3U41Q+EmfypVD8wc3G9EESXJDZizknQm0BysjftENp
7A7p+glY1oSYzot0AYfTKdxnMFGYgLUMcXjGSitN+JrzARRrIZHLf3dtA6cPZ8MyYv
S+79mloau2Nn8yJ7L9kJGA/quO8JGZfTHftIr/DU=
Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by
eucas1p2.samsung.com (KnoxPortal) with ESMTP id
20230328112720eucas1p22832e14ccc0ab8aa31019946721f05ee~Qka6fKv8z0111901119eucas1p2l;
Tue, 28 Mar 2023 11:27:20 +0000 (GMT)
Received: from eucas1p2.samsung.com ( [182.198.249.207]) by
eusmges1new.samsung.com (EUCPMTA) with SMTP id 75.51.09503.81FC2246;
Tue, 28
Mar 2023 12:27:20 +0100 (BST)
Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by
eucas1p2.samsung.com (KnoxPortal) with ESMTPA id
20230328112719eucas1p2b0f94ad7b06990203081d2b125dfc6ac~Qka531zRT0949409494eucas1p26;
Tue, 28 Mar 2023 11:27:19 +0000 (GMT)
Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by
eusmtrp2.samsung.com (KnoxPortal) with ESMTP id
20230328112719eusmtrp2e345237a90bdb05950bbce0a693b0b7e~Qka53IS6i0134701347eusmtrp2Q;
Tue, 28 Mar 2023 11:27:19 +0000 (GMT)
X-AuditID: cbfec7f2-e8fff7000000251f-7c-6422cf18c5ba
Received: from eusmtip1.samsung.com ( [203.254.199.221]) by
eusmgms2.samsung.com (EUCPMTA) with SMTP id 9D.71.09583.71FC2246;
Tue, 28
Mar 2023 12:27:19 +0100 (BST)
Received: from localhost (unknown [106.210.248.108]) by eusmtip1.samsung.com
(KnoxPortal) with ESMTPA id
20230328112719eusmtip1eb2b40496aafbd97f77244d6662ebaed~Qka5ppj340337303373eusmtip1Z;
Tue, 28 Mar 2023 11:27:19 +0000 (GMT)
From: Pankaj Raghav
To: martin@omnibond.com, axboe@kernel.dk, minchan@kernel.org,
akpm@linux-foundation.org, hubcap@omnibond.com,
willy@infradead.org, viro@zeniv.linux.org.uk,
senozhatsky@chromium.org, brauner@kernel.org
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
mcgrof@kernel.org, linux-block@vger.kernel.org,
gost.dev@samsung.com, linux-mm@kvack.org, devel@lists.orangefs.org,
Pankaj Raghav ,
Christoph Hellwig
Subject: [PATCH 3/5] mpage: split bi_end_io callback for reads and writes
Date: Tue, 28 Mar 2023 13:27:14 +0200
Message-Id: <20230328112716.50120-4-p.raghav@samsung.com>
X-Mailer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qbNdol5y11cd7bsqjn1/OjxXdtePowstgldtexz
7QTxe4uf/Vx2V2BLkMaGwz4934pi4+bdehheql7Z9kRmmYlXov3zeW/UO1WtYt2cc5LOmi7O
Nq2vf/up5enH1OJZlw9lryhRU9qaELrj1oym7cxKt1J0voRz/uabUD7ZXXyO+BXT1m+/GR7Y
yur/S3LW8/m+TuLiI4Ujq47JlumGFPg/sWWWtpy02WzLsquCQomCp3NlQ09v/fhXm8vv70Su
dtb7weI7nPe/qk87Ev7kyuNfsV/0Ts/Ym31+ve0l8VxzD9EYYVuLs2r1C4+terNI44HQ62+V
uRfag7nS8mKcdv3wkXsx1b5x742HpzVWyIoqsRRnJBpqMRcVJwIALLf4ZWgDAAA=
X-CMS-MailID: 20230328112719eucas1p2b0f94ad7b06990203081d2b125dfc6ac
X-Msg-Generator: CA
X-RootMTR: 20230328112719eucas1p2b0f94ad7b06990203081d2b125dfc6ac
X-EPHeader: CA
CMS-TYPE: 201P
X-CMS-RootMailID: 20230328112719eucas1p2b0f94ad7b06990203081d2b125dfc6ac
References: <20230328112716.50120-1-p.raghav@samsung.com>
Precedence: bulk
List-ID:
X-Mailing-List: linux-block@vger.kernel.org
Split the bi_end_io handler for reads and writes similar to other aops.
This is a prep patch before we convert end_io handlers to use folios.
Suggested-by: Christoph Hellwig
Signed-off-by: Pankaj Raghav
---
fs/mpage.c | 24 +++++++++++++++++++++---
1 file changed, 21 insertions(+), 3 deletions(-)
diff --git a/fs/mpage.c b/fs/mpage.c
index 22b9de5ddd68..3a545bf0f184 100644
--- a/fs/mpage.c
+++ b/fs/mpage.c
@@ -43,14 +43,28 @@
* status of that page is hard. See end_buffer_async_read() for the details.
* There is no point in duplicating all that complexity.
*/
-static void mpage_end_io(struct bio *bio)
+static void mpage_read_end_io(struct bio *bio)
{
struct bio_vec *bv;
struct bvec_iter_all iter_all;
bio_for_each_segment_all(bv, bio, iter_all) {
struct page *page = bv->bv_page;
- page_endio(page, bio_op(bio),
+ page_endio(page, REQ_OP_READ,
+ blk_status_to_errno(bio->bi_status));
+ }
+
+ bio_put(bio);
+}
+
+static void mpage_write_end_io(struct bio *bio)
+{
+ struct bio_vec *bv;
+ struct bvec_iter_all iter_all;
+
+ bio_for_each_segment_all(bv, bio, iter_all) {
+ struct page *page = bv->bv_page;
+ page_endio(page, REQ_OP_WRITE,
blk_status_to_errno(bio->bi_status));
}
@@ -59,7 +73,11 @@ static void mpage_end_io(struct bio *bio)
static struct bio *mpage_bio_submit(struct bio *bio)
{
- bio->bi_end_io = mpage_end_io;
+ if (op_is_write(bio_op(bio)))
+ bio->bi_end_io = mpage_write_end_io;
+ else
+ bio->bi_end_io = mpage_read_end_io;
+
guard_bio_eod(bio);
submit_bio(bio);
return NULL;
From patchwork Tue Mar 28 11:27:15 2023
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Pankaj Raghav
X-Patchwork-Id: 13190930
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 vger.kernel.org (vger.kernel.org [23.128.96.18])
by smtp.lore.kernel.org (Postfix) with ESMTP id 015DEC76196
for ; Tue, 28 Mar 2023 11:27:32 +0000 (UTC)
Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
id S232723AbjC1L1b (ORCPT );
Tue, 28 Mar 2023 07:27:31 -0400
Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42392 "EHLO
lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
with ESMTP id S229935AbjC1L12 (ORCPT
);
Tue, 28 Mar 2023 07:27:28 -0400
Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com
[210.118.77.11])
by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 730EE185
for ;
Tue, 28 Mar 2023 04:27:26 -0700 (PDT)
Received: from eucas1p1.samsung.com (unknown [182.198.249.206])
by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id
20230328112722euoutp01cc064857e323d21b8ad3b1b2a0565778~Qka8yF25y0361403614euoutp01r
for ;
Tue, 28 Mar 2023 11:27:22 +0000 (GMT)
DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com
20230328112722euoutp01cc064857e323d21b8ad3b1b2a0565778~Qka8yF25y0361403614euoutp01r
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com;
s=mail20170921; t=1680002842;
bh=C4y5H34/b66lYzmCayiry+Dr/iI1gotrFjxRhbqI+PI=;
h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
b=SOQeOheNVR3TOZRUeQLXiB9Fxu+PcuYHKieaWtx2g3+sxEx86tj7vwcSVUFDblKMz
Vj9tVHIZqhGlVhs5bIfLHmUm6Q8p7o9xtBiSeHx+scxD1HY0YSnL9ots26OszOY10S
VMBk19gD3UFgy+dC35ln638RaAPyCp6CALsLljU8=
Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by
eucas1p2.samsung.com (KnoxPortal) with ESMTP id
20230328112720eucas1p208a91e75a4df810cf7dd3781ee8559e2~Qka7MHLqp0948509485eucas1p2J;
Tue, 28 Mar 2023 11:27:20 +0000 (GMT)
Received: from eucas1p1.samsung.com ( [182.198.249.206]) by
eusmges1new.samsung.com (EUCPMTA) with SMTP id 07.51.09503.81FC2246;
Tue, 28
Mar 2023 12:27:20 +0100 (BST)
Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by
eucas1p1.samsung.com (KnoxPortal) with ESMTPA id
20230328112720eucas1p1148c03b8664f6c212c7189454a36b796~Qka6blNGF1794717947eucas1p1w;
Tue, 28 Mar 2023 11:27:20 +0000 (GMT)
Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by
eusmtrp2.samsung.com (KnoxPortal) with ESMTP id
20230328112720eusmtrp269ad4302d80bafe5b32231e8e7b2f8b3~Qka6a46bI0134701347eusmtrp2R;
Tue, 28 Mar 2023 11:27:20 +0000 (GMT)
X-AuditID: cbfec7f2-e8fff7000000251f-7e-6422cf189df9
Received: from eusmtip2.samsung.com ( [203.254.199.222]) by
eusmgms2.samsung.com (EUCPMTA) with SMTP id 1F.71.09583.71FC2246;
Tue, 28
Mar 2023 12:27:20 +0100 (BST)
Received: from localhost (unknown [106.210.248.108]) by eusmtip2.samsung.com
(KnoxPortal) with ESMTPA id
20230328112719eusmtip21f0b4a5953ca974547d94cb63d3c29a0~Qka6Ka8Ob2590125901eusmtip2_;
Tue, 28 Mar 2023 11:27:19 +0000 (GMT)
From: Pankaj Raghav
To: martin@omnibond.com, axboe@kernel.dk, minchan@kernel.org,
akpm@linux-foundation.org, hubcap@omnibond.com,
willy@infradead.org, viro@zeniv.linux.org.uk,
senozhatsky@chromium.org, brauner@kernel.org
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
mcgrof@kernel.org, linux-block@vger.kernel.org,
gost.dev@samsung.com, linux-mm@kvack.org, devel@lists.orangefs.org,
Pankaj Raghav
Subject: [PATCH 4/5] mpage: use folios in bio end_io handler
Date: Tue, 28 Mar 2023 13:27:15 +0200
Message-Id: <20230328112716.50120-5-p.raghav@samsung.com>
X-Mailer: git-send-email 2.34.1
In-Reply-To: <20230328112716.50120-1-p.raghav@samsung.com>
MIME-Version: 1.0
X-Brightmail-Tracker:
H4sIAAAAAAAAA+NgFrrLKsWRmVeSWpSXmKPExsWy7djPc7oS55VSDK73mlrMWb+GzWL13X42
i9eHPzFa7N88hcni5oGdTBbtd/uYLPbe0rbYs/cki8XlXXPYLO6t+c9qcXL9f2aLGxOeMlos
+/qe3eLz0hZ2i90bF7FZnP97nNXi9485bA6CHrMbLrJ4bF6h5XH5bKnHplWdbB6bPk1i9zgx
4zeLR8PUW2wev27fYfXo27KK0ePzJjmPTU/eMgVwR3HZpKTmZJalFunbJXBlLHh5iaVgAm/F
n0v72BoY73B1MXJySAiYSNxdco+9i5GLQ0hgBaPE3R9TGCGcL4wSDw88hHI+M0rc2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/3OKvF7x9z2BwEPWY3XGTx2LxCy+Py2VKPTas62Tw2fZrE7nFi
xm8Wj4apt9g8ft2+w+rRt2UVo8fnTXIem568ZQrgjtKzKcovLUlVyMgvLrFVija0MNIztLTQ
MzKx1DM0No+1MjJV0rezSUnNySxLLdK3S9DLWPDyEkvBBN6KP5f2sTUw3uHqYuTkkBAwkXg7
YwNLFyMXh5DAUkaJV09es0IkJCRuL2xihLCFJf5c62KDKHrOKHF/7n+gIg4ONgEticZOdpC4
iMANRom1T3+xgjjMIEV390FMEhawkfi3/gTYJBYBVYnG7x1gcV4BS4lTM+exQWyQl9h/8Cwz
yFBOASuJab+tQMJCQCVXz7xnhCgXlDg58wkLiM0MVN68dTbzBEaBWUhSs5CkFjAyrWIUSS0t
zk3PLTbSK07MLS7NS9dLzs/dxAiM123Hfm7Zwbjy1Ue9Q4xMHIyHGCU4mJVEeDd7K6YI8aYk
VlalFuXHF5XmpBYfYjQFOnsis5Rocj4wYeSVxBuaGZgamphZGphamhkrifN6FnQkCgmkJ5ak
ZqemFqQWwfQxcXBKNTAlPHR9UXHFs9y11PaUL7v3dQnTfoFVp6P17f9F+Hx/LfOS+0W3jGj7
LDbGQ9sXXtX8XewT+m3J9YN1M2ZbKM3KWuj0yvb4Iiv+CUITebjP+X+Oj1DLMYh8vXH3SwOG
H12pkpuOXl124ov8MTuWtKNZBz71HPin5Nm53LnskUXbrDn9olknAjLim49779Ap3p+xfoK2
w+XqWR8EJdY4ZrfwGER9qnGX331c4I+f5XrmlbvfNTZcqUzPWph3S5wnvLLmpXqC+KkHzuZX
Xj23LzoTJWfLdL7twZOUTsOSrwu6V2r3VcbNEC+Xcur3zO/bwJjZcG1d/sZf19l36vJZ3d34
9u7iY0o/5jqG7/edP0WJpTgj0VCLuag4EQAOWOnYYAMAAA==
X-CMS-MailID: 20230328112720eucas1p1148c03b8664f6c212c7189454a36b796
X-Msg-Generator: CA
X-RootMTR: 20230328112720eucas1p1148c03b8664f6c212c7189454a36b796
X-EPHeader: CA
CMS-TYPE: 201P
X-CMS-RootMailID: 20230328112720eucas1p1148c03b8664f6c212c7189454a36b796
References: <20230328112716.50120-1-p.raghav@samsung.com>
Precedence: bulk
List-ID:
X-Mailing-List: linux-block@vger.kernel.org
Use folios in the bio end_io handler. This conversion does the appropriate
handling on the folios in the respective end_io callback and removes the
call to page_endio(), which is soon to be removed.
Signed-off-by: Pankaj Raghav
---
fs/mpage.c | 28 ++++++++++++++++------------
1 file changed, 16 insertions(+), 12 deletions(-)
diff --git a/fs/mpage.c b/fs/mpage.c
index 3a545bf0f184..6f43b7c9d4de 100644
--- a/fs/mpage.c
+++ b/fs/mpage.c
@@ -45,13 +45,15 @@
*/
static void mpage_read_end_io(struct bio *bio)
{
- struct bio_vec *bv;
- struct bvec_iter_all iter_all;
+ struct folio_iter fi;
+ int err = blk_status_to_errno(bio->bi_status);
- bio_for_each_segment_all(bv, bio, iter_all) {
- struct page *page = bv->bv_page;
- page_endio(page, REQ_OP_READ,
- blk_status_to_errno(bio->bi_status));
+ bio_for_each_folio_all(fi, bio) {
+ if (!err)
+ folio_mark_uptodate(fi.folio);
+ else
+ folio_set_error(fi.folio);
+ folio_unlock(fi.folio);
}
bio_put(bio);
@@ -59,13 +61,15 @@ static void mpage_read_end_io(struct bio *bio)
static void mpage_write_end_io(struct bio *bio)
{
- struct bio_vec *bv;
- struct bvec_iter_all iter_all;
+ struct folio_iter fi;
+ int err = blk_status_to_errno(bio->bi_status);
- bio_for_each_segment_all(bv, bio, iter_all) {
- struct page *page = bv->bv_page;
- page_endio(page, REQ_OP_WRITE,
- blk_status_to_errno(bio->bi_status));
+ bio_for_each_folio_all(fi, bio) {
+ if (err) {
+ folio_set_error(fi.folio);
+ mapping_set_error(fi.folio->mapping, err);
+ }
+ folio_end_writeback(fi.folio);
}
bio_put(bio);
From patchwork Tue Mar 28 11:27:16 2023
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Pankaj Raghav
X-Patchwork-Id: 13190931
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 vger.kernel.org (vger.kernel.org [23.128.96.18])
by smtp.lore.kernel.org (Postfix) with ESMTP id 9BF1EC77B61
for ; Tue, 28 Mar 2023 11:27:36 +0000 (UTC)
Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
id S232548AbjC1L1f (ORCPT );
Tue, 28 Mar 2023 07:27:35 -0400
Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42514 "EHLO
lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
with ESMTP id S232700AbjC1L1a (ORCPT
);
Tue, 28 Mar 2023 07:27:30 -0400
Received: from mailout2.w1.samsung.com (mailout2.w1.samsung.com
[210.118.77.12])
by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7D4ACAB
for ;
Tue, 28 Mar 2023 04:27:28 -0700 (PDT)
Received: from eucas1p2.samsung.com (unknown [182.198.249.207])
by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id
20230328112722euoutp02bcc171994103c23afa1731972d9d8e85~Qka8_Iyc33057130571euoutp02e
for ;
Tue, 28 Mar 2023 11:27:22 +0000 (GMT)
DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com
20230328112722euoutp02bcc171994103c23afa1731972d9d8e85~Qka8_Iyc33057130571euoutp02e
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com;
s=mail20170921; t=1680002842;
bh=Qd/EHq/hNi9U0eDQzSkYHva3vzVuhQ3/uVr2IhrtsQQ=;
h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
b=drjE9jpUzOwvKJrVY1iPOEPDBI27vBqwRWG6il8vuZYyNEyvF6xBLiF4Bd4xSnZkc
khY2nUF+KDemqhNUQEnNdRD902LjMfSzeHSnDrTvdNr8Q8xVYscrY9hnWflP+iFEkz
Afy6ntAMmTCyit7LuLu7bVEafMfaYQvM4EaRrdX4=
Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by
eucas1p2.samsung.com (KnoxPortal) with ESMTP id
20230328112721eucas1p29c3e5a9281c3f21042a2ffafdd0866eb~Qka7TOoBk2371323713eucas1p2a;
Tue, 28 Mar 2023 11:27:21 +0000 (GMT)
Received: from eucas1p1.samsung.com ( [182.198.249.206]) by
eusmges1new.samsung.com (EUCPMTA) with SMTP id 38.51.09503.81FC2246;
Tue, 28
Mar 2023 12:27:20 +0100 (BST)
Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by
eucas1p2.samsung.com (KnoxPortal) with ESMTPA id
20230328112720eucas1p2bbb42b49da00b4f2299049bf6bafce48~Qka65Z-hg0535105351eucas1p2X;
Tue, 28 Mar 2023 11:27:20 +0000 (GMT)
Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by
eusmtrp2.samsung.com (KnoxPortal) with ESMTP id
20230328112720eusmtrp2ce3dc34f33115a65d99589fcad9b4c0a~Qka63UKs50134701347eusmtrp2U;
Tue, 28 Mar 2023 11:27:20 +0000 (GMT)
X-AuditID: cbfec7f2-e8fff7000000251f-80-6422cf18967a
Received: from eusmtip2.samsung.com ( [203.254.199.222]) by
eusmgms2.samsung.com (EUCPMTA) with SMTP id A0.81.09583.81FC2246;
Tue, 28
Mar 2023 12:27:20 +0100 (BST)
Received: from localhost (unknown [106.210.248.108]) by eusmtip2.samsung.com
(KnoxPortal) with ESMTPA id
20230328112720eusmtip2188f4b42b34ffb070ff5ffc1e476b9e4~Qka6sYigr0132101321eusmtip28;
Tue, 28 Mar 2023 11:27:20 +0000 (GMT)
From: Pankaj Raghav
To: martin@omnibond.com, axboe@kernel.dk, minchan@kernel.org,
akpm@linux-foundation.org, hubcap@omnibond.com,
willy@infradead.org, viro@zeniv.linux.org.uk,
senozhatsky@chromium.org, brauner@kernel.org
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
mcgrof@kernel.org, linux-block@vger.kernel.org,
gost.dev@samsung.com, linux-mm@kvack.org, devel@lists.orangefs.org,
Pankaj Raghav
Subject: [PATCH 5/5] filemap: remove page_endio()
Date: Tue, 28 Mar 2023 13:27:16 +0200
Message-Id: <20230328112716.50120-6-p.raghav@samsung.com>
X-Mailer: git-send-email 2.34.1
In-Reply-To: <20230328112716.50120-1-p.raghav@samsung.com>
MIME-Version: 1.0
X-Brightmail-Tracker:
H4sIAAAAAAAAA+NgFrrLKsWRmVeSWpSXmKPExsWy7djPc7oS55VSDN5ftLaYs34Nm8Xqu/1s
Fq8Pf2K02L95CpPFzQM7mSza7/YxWey9pW2xZ+9JFovLu+awWdxb85/V4uT6/8wWNyY8ZbRY
9vU9u8XnpS3sFrs3LmKzOP/3OKvF7x9z2BwEPWY3XGTx2LxCy+Py2VKPTas62Tw2fZrE7nFi
xm8Wj4apt9g8ft2+w+rRt2UVo8fnTXIem568ZQrgjuKySUnNySxLLdK3S+DKeNs9i7VgHl/F
+vsfGBsYz3J3MXJySAiYSPzddpipi5GLQ0hgBaPEqZNXGUESQgJfGCUuX7CCSHxmlFi37gYj
TMeOt//ZIRLLGSVWt79hhHBeMkqsfTOPuYuRg4NNQEuisROsSETgDKPE4uWNbCAOs8B9Rolv
L88zgYwSFjCUWDH3CZjNIqAqsXzuOzYQm1fAUmLD9IssEOvkJfYfPAs2lFPASmLabyuIEkGJ
kzOfgJUwA5U0b53NDDJfQmA1p8S8C49ZIXpdJG5828AEYQtLvDq+hR3ClpH4v3M+VLxa4umN
31DNLYwS/TvXs4EskxCwlug7kwNiMgtoSqzfpQ9R7ijRd2MlI0QFn8SNt4IQJ/BJTNo2nRki
zCvR0SYEUa0ksfPnE6ilEhKXm+ZAPeUhcWz3JfYJjIqzkDwzC8kzsxD2LmBkXsUonlpanJue
WmyYl1quV5yYW1yal66XnJ+7iRGYAk//O/5pB+PcVx/1DjEycTAeYpTgYFYS4d3srZgixJuS
WFmVWpQfX1Sak1p8iFGag0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GJg7GQ4wSHMxKIrybvRVThHhT
EiurUovy44tKc1KLDzGaAp09kVlKNDkfmDDySuINzQxMDU3MLA1MLc2MlcR5PQs6EoUE0hNL
UrNTUwtSi2D6mDg4pRqYNJN2fz/6QVTltN8ZF97WlRk3LhiW3Gc8ad27onHbTaaClaem7VN7
7lAqpSIsl116c96/MOvOhUt3ph+ds/2soKH+l3uvF9q9YpXl5FVp0lv5+zsPy6cX+ctZ7ghn
PDLSjRL3Mpzx+F/biQX9fZb1fJOWicQKnVx2Zp7StQBd3Rm+Rco73+mGHr7OL2Mr87HVXNym
8saWVzU/Hk18ULqxwEm2SZ1nelPnFP2V/fynJmsYnefq/Zox61Ak85/w9MVuh0IL9/xKE534
5cDE8vAnqo+XBObzHa0+/fCj1INph7ZkXOlVZA5+Gn9ONL51BssFI/0Gsdvn4yXm2Ga0MQvP
2xTsycD/VbS//bH6rMJ0JZbijERDLeai4kQAvVarymADAAA=
X-CMS-MailID: 20230328112720eucas1p2bbb42b49da00b4f2299049bf6bafce48
X-Msg-Generator: CA
X-RootMTR: 20230328112720eucas1p2bbb42b49da00b4f2299049bf6bafce48
X-EPHeader: CA
CMS-TYPE: 201P
X-CMS-RootMailID: 20230328112720eucas1p2bbb42b49da00b4f2299049bf6bafce48
References: <20230328112716.50120-1-p.raghav@samsung.com>
Precedence: bulk
List-ID:
X-Mailing-List: linux-block@vger.kernel.org
page_endio() is not used anymore. Remove it.
Signed-off-by: Pankaj Raghav
---
include/linux/pagemap.h | 2 --
mm/filemap.c | 30 ------------------------------
2 files changed, 32 deletions(-)
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h
index fdcd595d2294..73ee6ead90dd 100644
--- a/include/linux/pagemap.h
+++ b/include/linux/pagemap.h
@@ -1076,8 +1076,6 @@ int filemap_migrate_folio(struct address_space *mapping, struct folio *dst,
#else
#define filemap_migrate_folio NULL
#endif
-void page_endio(struct page *page, bool is_write, int err);
-
void folio_end_private_2(struct folio *folio);
void folio_wait_private_2(struct folio *folio);
int folio_wait_private_2_killable(struct folio *folio);
diff --git a/mm/filemap.c b/mm/filemap.c
index 6f3a7e53fccf..a770a207825d 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -1625,36 +1625,6 @@ void folio_end_writeback(struct folio *folio)
}
EXPORT_SYMBOL(folio_end_writeback);
-/*
- * After completing I/O on a page, call this routine to update the page
- * flags appropriately
- */
-void page_endio(struct page *page, bool is_write, int err)
-{
- struct folio *folio = page_folio(page);
-
- if (!is_write) {
- if (!err) {
- folio_mark_uptodate(folio);
- } else {
- folio_clear_uptodate(folio);
- folio_set_error(folio);
- }
- folio_unlock(folio);
- } else {
- if (err) {
- struct address_space *mapping;
-
- folio_set_error(folio);
- mapping = folio_mapping(folio);
- if (mapping)
- mapping_set_error(mapping, err);
- }
- folio_end_writeback(folio);
- }
-}
-EXPORT_SYMBOL_GPL(page_endio);
-
/**
* __folio_lock - Get a lock on the folio, assuming we need to sleep to get it.
* @folio: The folio to lock