[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <163250388519.2330363.14896768040342703526.stgit@warthog.procyon.org.uk>
Date: Fri, 24 Sep 2021 18:18:05 +0100
From: David Howells <dhowells@...hat.com>
To: willy@...radead.org, hch@....de, trond.myklebust@...marydata.com
Cc: "Darrick J. Wong" <djwong@...nel.org>,
Seth Jennings <sjenning@...ux.vnet.ibm.com>,
Bob Liu <bob.liu@...cle.com>, Minchan Kim <minchan@...nel.org>,
Dan Magenheimer <dan.magenheimer@...cle.com>,
linux-block@...r.kernel.org, linux-xfs@...r.kernel.org,
linux-fsdevel@...r.kernel.org, linux-mm@...ck.org,
dhowells@...hat.com, dhowells@...hat.com, darrick.wong@...cle.com,
viro@...iv.linux.org.uk, jlayton@...nel.org,
torvalds@...ux-foundation.org, linux-nfs@...r.kernel.org,
linux-mm@...ck.org, linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH v3 1/9] mm: Remove the callback func argument from
__swap_writepage()
Remove the callback func argument from __swap_writepage() as it's
end_swap_bio_write() in both places that call it.
This reverts:
commit 1eec6702a80e04416d528846a5ff2122484d95ec
mm: allow for outstanding swap writeback accounting
Signed-off-by: David Howells <dhowells@...hat.com>
Reviewed-by: Christoph Hellwig <hch@....de>
cc: Matthew Wilcox (Oracle) <willy@...radead.org>
cc: Darrick J. Wong <djwong@...nel.org>
cc: Seth Jennings <sjenning@...ux.vnet.ibm.com>
cc: Bob Liu <bob.liu@...cle.com>
cc: Minchan Kim <minchan@...nel.org>
cc: Dan Magenheimer <dan.magenheimer@...cle.com>
cc: linux-block@...r.kernel.org
cc: linux-xfs@...r.kernel.org
cc: linux-fsdevel@...r.kernel.org
cc: linux-mm@...ck.org
---
include/linux/swap.h | 4 +---
mm/page_io.c | 9 ++++-----
mm/zswap.c | 2 +-
3 files changed, 6 insertions(+), 9 deletions(-)
diff --git a/include/linux/swap.h b/include/linux/swap.h
index ba52f3a3478e..576d40e33b1f 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -418,9 +418,7 @@ extern void kswapd_stop(int nid);
/* linux/mm/page_io.c */
extern int swap_readpage(struct page *page, bool do_poll);
extern int swap_writepage(struct page *page, struct writeback_control *wbc);
-extern void end_swap_bio_write(struct bio *bio);
-extern int __swap_writepage(struct page *page, struct writeback_control *wbc,
- bio_end_io_t end_write_func);
+int __swap_writepage(struct page *page, struct writeback_control *wbc);
extern int swap_set_page_dirty(struct page *page);
int add_swap_extent(struct swap_info_struct *sis, unsigned long start_page,
diff --git a/mm/page_io.c b/mm/page_io.c
index c493ce9ebcf5..afd18f6ec09e 100644
--- a/mm/page_io.c
+++ b/mm/page_io.c
@@ -26,7 +26,7 @@
#include <linux/uio.h>
#include <linux/sched/task.h>
-void end_swap_bio_write(struct bio *bio)
+static void end_swap_bio_write(struct bio *bio)
{
struct page *page = bio_first_page_all(bio);
@@ -249,7 +249,7 @@ int swap_writepage(struct page *page, struct writeback_control *wbc)
end_page_writeback(page);
goto out;
}
- ret = __swap_writepage(page, wbc, end_swap_bio_write);
+ ret = __swap_writepage(page, wbc);
out:
return ret;
}
@@ -282,8 +282,7 @@ static void bio_associate_blkg_from_page(struct bio *bio, struct page *page)
#define bio_associate_blkg_from_page(bio, page) do { } while (0)
#endif /* CONFIG_MEMCG && CONFIG_BLK_CGROUP */
-int __swap_writepage(struct page *page, struct writeback_control *wbc,
- bio_end_io_t end_write_func)
+int __swap_writepage(struct page *page, struct writeback_control *wbc)
{
struct bio *bio;
int ret;
@@ -341,7 +340,7 @@ int __swap_writepage(struct page *page, struct writeback_control *wbc,
bio_set_dev(bio, sis->bdev);
bio->bi_iter.bi_sector = swap_page_sector(page);
bio->bi_opf = REQ_OP_WRITE | REQ_SWAP | wbc_to_write_flags(wbc);
- bio->bi_end_io = end_write_func;
+ bio->bi_end_io = end_swap_bio_write;
bio_add_page(bio, page, thp_size(page), 0);
bio_associate_blkg_from_page(bio, page);
diff --git a/mm/zswap.c b/mm/zswap.c
index 7944e3e57e78..f38e34917aa3 100644
--- a/mm/zswap.c
+++ b/mm/zswap.c
@@ -1011,7 +1011,7 @@ static int zswap_writeback_entry(struct zpool *pool, unsigned long handle)
SetPageReclaim(page);
/* start writeback */
- __swap_writepage(page, &wbc, end_swap_bio_write);
+ __swap_writepage(page, &wbc);
put_page(page);
zswap_written_back_pages++;
Powered by blists - more mailing lists