]> git.baikalelectronics.ru Git - kernel.git/commit
fs: check for writeback errors after syncing out buffers in generic_file_fsync
authorJeff Layton <jlayton@redhat.com>
Thu, 6 Jul 2017 11:02:21 +0000 (07:02 -0400)
committerJeff Layton <jlayton@redhat.com>
Thu, 6 Jul 2017 11:02:21 +0000 (07:02 -0400)
commit611625aa5c2623640c73709fb34c058b30c46d1c
tree716ff1d0955826e258d73213aeb3053eb3c2fe53
parent0dd054cd3fb69ad53881c07bc720ed7cd8ed02bc
fs: check for writeback errors after syncing out buffers in generic_file_fsync

ext2 currently does a test+clear of the AS_EIO flag, which is
is problematic for some coming changes.

What we really need to do instead is call filemap_check_errors
in __generic_file_fsync after syncing out the buffers. That
will be sufficient for this case, and help other callers detect
these errors properly as well.

With that, we don't need to twiddle it in ext2.

Suggested-by: Jan Kara <jack@suse.cz>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Matthew Wilcox <mawilcox@microsoft.com>
fs/ext2/file.c
fs/libfs.c