NFSv4: Fix delegation state recovery
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Fri, 19 Jul 2019 18:08:37 +0000 (14:08 -0400)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Mon, 5 Aug 2019 02:35:40 +0000 (22:35 -0400)
commit5eb8d18ca0e001c6055da2b7f30d8f6dca23a44f
treef70d59c3ba857e5353e01e70f616fbc2a9b99e58
parent8c39a39e28b86a4021d9be314ce01019bafa5fdc
NFSv4: Fix delegation state recovery

Once we clear the NFS_DELEGATED_STATE flag, we're telling
nfs_delegation_claim_opens() that we're done recovering all open state
for that stateid, so we really need to ensure that we test for all
open modes that are currently cached and recover them before exiting
nfs4_open_delegation_recall().

Fixes: 24311f884189d ("NFSv4: Recovery of recalled read delegations...")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Cc: stable@vger.kernel.org # v4.3+
fs/nfs/delegation.c
fs/nfs/delegation.h
fs/nfs/nfs4proc.c