NFS: Ensure nfs_readpage returns promptly when internal error occurs
authorDave Wysochanski <dwysocha@redhat.com>
Tue, 29 Jun 2021 09:11:28 +0000 (05:11 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 20 Jul 2021 14:02:21 +0000 (16:02 +0200)
commite2218384435783e5d53c6401c7b5886d49a3a904
tree4746ae949ce57298f44af93510a8c8d8e87e2983
parent48161ad218461e453a6a1c9120b837c7f19072f5
NFS: Ensure nfs_readpage returns promptly when internal error occurs

commit e0340f16a08d031de54ed91d26f57c9a966a776a upstream.

A previous refactoring of nfs_readpage() might end up calling
wait_on_page_locked_killable() even if readpage_async_filler() failed
with an internal error and pg_error was non-zero (for example, if
nfs_create_request() failed).  In the case of an internal error,
skip over wait_on_page_locked_killable() as this is only needed
when the read is sent and an error occurs during completion handling.

Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/nfs/read.c