diff options
Diffstat (limited to 'fs/libfs.c')
-rw-r--r-- | fs/libfs.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/libfs.c b/fs/libfs.c index a04395334bb1..1b76f29799bf 100644 --- a/fs/libfs.c +++ b/fs/libfs.c @@ -991,7 +991,9 @@ int __generic_file_fsync(struct file *file, loff_t start, loff_t end, out: inode_unlock(inode); - return ret; + /* must call this unconditionally as it clears AS_* error flags */ + err = filemap_check_errors(inode->i_mapping); + return ret ? ret : err; } EXPORT_SYMBOL(__generic_file_fsync); |