[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230109051823.480289-12-willy@infradead.org>
Date: Mon, 9 Jan 2023 05:18:23 +0000
From: "Matthew Wilcox (Oracle)" <willy@...radead.org>
To: unlisted-recipients:; (no To-header on input)
Cc: "Matthew Wilcox (Oracle)" <willy@...radead.org>,
Jeff Layton <jlayton@...hat.com>,
linux-fsdevel@...r.kernel.org, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, Christoph Hellwig <hch@....de>
Subject: [PATCH 11/11] mm: Remove filemap_fdatawait_keep_errors()
This function is now the same as filemap_fdatawait(), so change all
callers to use that instead. Remove the comments which talk about keeping
the errors around for other callers as this is now the only behaviour.
Signed-off-by: Matthew Wilcox (Oracle) <willy@...radead.org>
---
block/bdev.c | 8 +-------
fs/fs-writeback.c | 7 +------
fs/xfs/scrub/bmap.c | 2 +-
include/linux/pagemap.h | 2 --
4 files changed, 3 insertions(+), 16 deletions(-)
diff --git a/block/bdev.c b/block/bdev.c
index edc110d90df4..2fae19f0a5c2 100644
--- a/block/bdev.c
+++ b/block/bdev.c
@@ -1053,13 +1053,7 @@ void sync_bdevs(bool wait)
if (!atomic_read(&bdev->bd_openers)) {
; /* skip */
} else if (wait) {
- /*
- * We keep the error status of individual mapping so
- * that applications can catch the writeback error using
- * fsync(2). See filemap_fdatawait_keep_errors() for
- * details.
- */
- filemap_fdatawait_keep_errors(inode->i_mapping);
+ filemap_fdatawait(inode->i_mapping);
} else {
filemap_fdatawrite(inode->i_mapping);
}
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
index 6fba5a52127b..dc0158125e5d 100644
--- a/fs/fs-writeback.c
+++ b/fs/fs-writeback.c
@@ -2598,12 +2598,7 @@ static void wait_sb_inodes(struct super_block *sb)
spin_unlock(&inode->i_lock);
rcu_read_unlock();
- /*
- * We keep the error status of individual mapping so that
- * applications can catch the writeback error using fsync(2).
- * See filemap_fdatawait_keep_errors() for details.
- */
- filemap_fdatawait_keep_errors(mapping);
+ filemap_fdatawait(mapping);
cond_resched();
diff --git a/fs/xfs/scrub/bmap.c b/fs/xfs/scrub/bmap.c
index d50d0eab196a..8f169047d410 100644
--- a/fs/xfs/scrub/bmap.c
+++ b/fs/xfs/scrub/bmap.c
@@ -64,7 +64,7 @@ xchk_setup_inode_bmap(
*/
error = filemap_fdatawrite(mapping);
if (!error)
- error = filemap_fdatawait_keep_errors(mapping);
+ error = filemap_fdatawait(mapping);
if (error && (error != -ENOSPC && error != -EIO))
goto out;
}
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h
index 7fe2a5ec1c12..69190335deb1 100644
--- a/include/linux/pagemap.h
+++ b/include/linux/pagemap.h
@@ -40,8 +40,6 @@ static inline int filemap_fdatawait(struct address_space *mapping)
return filemap_fdatawait_range(mapping, 0, LLONG_MAX);
}
-#define filemap_fdatawait_keep_errors(mapping) filemap_fdatawait(mapping)
-
bool filemap_range_has_page(struct address_space *, loff_t lstart, loff_t lend);
int filemap_write_and_wait_range(struct address_space *mapping,
loff_t lstart, loff_t lend);
--
2.35.1
Powered by blists - more mailing lists