diff options
author | Theodore Ts'o <tytso@mit.edu> | 2018-12-31 00:11:07 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2018-12-31 00:11:07 -0500 |
commit | 95cb67138746451cc84cf8e516e14989746e93b0 (patch) | |
tree | 179dff6df500a16e1eee401c5a5ea27afdd996fd /fs | |
parent | ad211f3e94b314a910d4af03178a0b52a7d1ee0a (diff) |
ext4: track writeback errors using the generic tracking infrastructure
We already using mapping_set_error() in fs/ext4/page_io.c, so all we
need to do is to use file_check_and_advance_wb_err() when handling
fsync() requests in ext4_sync_file().
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@kernel.org
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ext4/fsync.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/ext4/fsync.c b/fs/ext4/fsync.c index 87a7ff00ef62..712f00995390 100644 --- a/fs/ext4/fsync.c +++ b/fs/ext4/fsync.c @@ -164,6 +164,9 @@ int ext4_sync_file(struct file *file, loff_t start, loff_t end, int datasync) ret = err; } out: + err = file_check_and_advance_wb_err(file); + if (ret == 0) + ret = err; trace_ext4_sync_file_exit(inode, ret); return ret; } |