summaryrefslogtreecommitdiffstats
path: root/fs/ext4/fsync.c
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2018-12-31 06:11:07 +0100
committerTheodore Ts'o <tytso@mit.edu>2018-12-31 06:11:07 +0100
commit95cb67138746451cc84cf8e516e14989746e93b0 (patch)
tree179dff6df500a16e1eee401c5a5ea27afdd996fd /fs/ext4/fsync.c
parentext4: use ext4_write_inode() when fsyncing w/o a journal (diff)
downloadlinux-95cb67138746451cc84cf8e516e14989746e93b0.tar.xz
linux-95cb67138746451cc84cf8e516e14989746e93b0.zip
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/ext4/fsync.c')
-rw-r--r--fs/ext4/fsync.c3
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;
}