NFS: Don't inadvertently clear writeback errors
vfs_fsync() has the side effect of clearing unreported writeback errors, so we need to make sure that we do not abuse it in situations where applications might not normally expect us to report those errors. The solution is to replace calls to vfs_fsync() with calls to nfs_wb_all(). Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
This commit is contained in:

committed by
Anna Schumaker

parent
22876f540b
commit
aded8d7b54
@@ -125,7 +125,7 @@ nfs4_file_flush(struct file *file, fl_owner_t id)
|
||||
return filemap_fdatawrite(file->f_mapping);
|
||||
|
||||
/* Flush writes to the server and return any errors */
|
||||
return vfs_fsync(file, 0);
|
||||
return nfs_wb_all(inode);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_NFS_V4_2
|
||||
|
Reference in New Issue
Block a user