diff mbox series

[03/11] f2fs: Convert f2fs_wait_on_node_pages_writeback() to errseq

Message ID 20230109051823.480289-4-willy@infradead.org (mailing list archive)
State New, archived
Headers show
Series Remove AS_EIO and AS_ENOSPC | expand

Commit Message

Matthew Wilcox Jan. 9, 2023, 5:18 a.m. UTC
Convert from the old filemap_check_errors() to the errseq infrastructure.
This means we will not report any previously-occurring error, and we will
not clear any previously-occurring error.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
---
 fs/f2fs/node.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index dde4c0458704..a87b5515c681 100644
--- a/fs/f2fs/node.c
+++ b/fs/f2fs/node.c
@@ -2055,12 +2055,14 @@  int f2fs_sync_node_pages(struct f2fs_sb_info *sbi,
 int f2fs_wait_on_node_pages_writeback(struct f2fs_sb_info *sbi,
 						unsigned int seq_id)
 {
+	struct address_space *mapping = NODE_MAPPING(sbi);
 	struct fsync_node_entry *fn;
 	struct page *page;
 	struct list_head *head = &sbi->fsync_node_list;
 	unsigned long flags;
 	unsigned int cur_seq_id = 0;
 	int ret2, ret = 0;
+	errseq_t since = filemap_sample_wb_err(mapping);
 
 	while (seq_id && cur_seq_id < seq_id) {
 		spin_lock_irqsave(&sbi->fsync_node_lock, flags);
@@ -2088,7 +2090,7 @@  int f2fs_wait_on_node_pages_writeback(struct f2fs_sb_info *sbi,
 			break;
 	}
 
-	ret2 = filemap_check_errors(NODE_MAPPING(sbi));
+	ret2 = filemap_check_wb_err(mapping, since);
 	if (!ret)
 		ret = ret2;