[11/11] mm: Remove filemap_fdatawait_keep_errors()
Commit Message
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(-)
@@ -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);
}
@@ -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();
@@ -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;
}
@@ -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);