nfs: nfs_file_write() should check for writeback errors
authorScott Mayhew <smayhew@redhat.com>
Sat, 1 Aug 2020 11:10:39 +0000 (07:10 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Aug 2020 11:15:14 +0000 (13:15 +0200)
commitd9ce6955f9232a3b6581dcad197ca4e093fcf6cf
tree1dd2fee18ab340cacb37619699d629688bc2b2c2
parentff1345a6663d9527e01aa808ff1f7ff50bc5235d
nfs: nfs_file_write() should check for writeback errors

[ Upstream commit ce368536dd614452407dc31e2449eb84681a06af ]

The NFS_CONTEXT_ERROR_WRITE flag (as well as the check of said flag) was
removed by commit 6fbda89b257f.  The absence of an error check allows
writes to be continually queued up for a server that may no longer be
able to handle them.  Fix it by adding an error check using the generic
error reporting functions.

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