pNFS: Ensure we do clear the return-on-close layout stateid on fatal errors
authorTrond Myklebust <trondmy@gmail.com>
Fri, 20 Sep 2019 11:23:40 +0000 (07:23 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 11 Oct 2019 16:21:17 +0000 (18:21 +0200)
commit19b1c70e911c4979a501a56228414cbc4229982d
tree699c7efac28571f9376ab4ac782461be79606c9a
parent1c70ae6a91f9a17280476dd8675e4ce60f32eb0b
pNFS: Ensure we do clear the return-on-close layout stateid on fatal errors

[ Upstream commit 9c47b18cf722184f32148784189fca945a7d0561 ]

IF the server rejected our layout return with a state error such as
NFS4ERR_BAD_STATEID, or even a stale inode error, then we do want
to clear out all the remaining layout segments and mark that stateid
as invalid.

Fixes: 1c5bd76d17cca ("pNFS: Enable layoutreturn operation for...")
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/pnfs.c