NFS: Don't inadvertently clear writeback errors
authorTrond Myklebust <trondmy@gmail.com>
Sun, 7 Apr 2019 17:59:04 +0000 (13:59 -0400)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Thu, 25 Apr 2019 18:18:14 +0000 (14:18 -0400)
commitaded8d7b54f250af6deb72fde475291cfba513d1
treeb1836af68dccf3bc8a4c7163c5503388b260666d
parent22876f540bdf19af9e4fca893ce02ba7ee65ebcc
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>
fs/nfs/file.c
fs/nfs/nfs4file.c