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
commit 95cb671 upstream.

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
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Theodore Ts'o authored and Greg Kroah-Hartman committed Jan 16, 2019
1 parent 82f71b8 commit 5903fc6
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 5903fc6

Please sign in to comment.