NFS: Fix up fsync() when the server rebooted
authorTrond Myklebust <trondmy@gmail.com>
Mon, 6 Jan 2020 20:25:03 +0000 (15:25 -0500)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Wed, 15 Jan 2020 15:54:32 +0000 (10:54 -0500)
commit2197e9b06c228b65a2cef98ef34d6bf42fa1af3d
tree1d36b340780c97d478d987105a684d7c69e33c7e
parentb32d285539e061dc3961e86f825d4ded5ba6de14
NFS: Fix up fsync() when the server rebooted

Don't clear the NFS_CONTEXT_RESEND_WRITES flag until after calling
nfs_commit_inode(). Otherwise, if nfs_commit_inode() returns an
error, we end up with dirty pages in the page cache, but no tag
to tell us that those pages need resending.

Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
fs/nfs/file.c