]> www.infradead.org Git - users/dwmw2/linux.git/commit
NFSv4.x recover from pre-mature loss of openstateid
authorOlga Kornievskaia <kolga@netapp.com>
Wed, 18 Dec 2019 21:50:42 +0000 (16:50 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 14 Feb 2020 21:52:58 +0000 (16:52 -0500)
commit770b983325c4f6749b0c370afec7af57c28c413f
treedcdfa690481c065107aba0a799916d45c686534b
parent46a4c74b32aecaef9f459101617f1db1b9c7b96c
NFSv4.x recover from pre-mature loss of openstateid

commit d826e5b827641ae1bebb33d23a774f4e9bb8e94f upstream.

Ever since the commit 0e0cb35b417f, it's possible to lose an open stateid
while retrying a CLOSE due to ERR_OLD_STATEID. Once that happens,
operations that require openstateid fail with EAGAIN which is propagated
to the application then tests like generic/446 and generic/168 fail with
"Resource temporarily unavailable".

Instead of returning this error, initiate state recovery when possible to
recover the open stateid and then try calling nfs4_select_rw_stateid()
again.

Fixes: 0e0cb35b417f ("NFSv4: Handle NFS4ERR_OLD_STATEID in CLOSE/OPEN_DOWNGRADE")
Signed-off-by: Olga Kornievskaia <kolga@netapp.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/nfs/nfs42proc.c
fs/nfs/nfs4proc.c
fs/nfs/pnfs.c