Skip to content

Commit

Permalink
ext4: track writeback errors using the generic tracking infrastructure
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Theodore Ts'o committed Dec 31, 2018
1 parent ad211f3 commit 95cb671
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions fs/ext4/fsync.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

0 comments on commit 95cb671

Please sign in to comment.