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:07:39 +0000 (13:07 +0200)
commitf0bcc25314ff43f801d709214599884d4b1ac58f
tree903b25c622cd642de6c39acfd948860e3d54a964
parent4c6b5e4fff8ba115f96167a9ee6e23350d76bb0b
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