diff mbox series

[11/11] mm: Remove filemap_fdatawait_keep_errors()

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

Commit Message

Matthew Wilcox (Oracle) Jan. 9, 2023, 5:18 a.m. UTC
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@infradead.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 mbox series

Patch

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);