NFS: Do not report flush errors in nfs_write_end()
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Sat, 14 May 2022 14:27:03 +0000 (10:27 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jun 2022 08:23:15 +0000 (10:23 +0200)
commita3bbd8b1aa4ccbf19c0ff7b07e7ebe457cbf2094
tree6339de42179110319b3f1b5868f20fe2d5dd9651
parent3a2d62ec419bf38ed63a9753c854bee3f068829c
NFS: Do not report flush errors in nfs_write_end()

[ Upstream commit d95b26650e86175e4a97698d89bc1626cd1df0c6 ]

If we do flush cached writebacks in nfs_write_end() due to the imminent
expiration of an RPCSEC_GSS session, then we should defer reporting any
resulting errors until the calls to file_check_and_advance_wb_err() in
nfs_file_write() and nfs_file_fsync().

Fixes: 6fbda89b257f ("NFS: Replace custom error reporting mechanism with generic one")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/nfs/file.c