]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
NFSv4.1: We must always send RECLAIM_COMPLETE after a reboot
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Sun, 16 Oct 2022 18:44:33 +0000 (14:44 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Nov 2022 14:46:05 +0000 (15:46 +0100)
[ Upstream commit e59679f2b7e522ecad99974e5636291ffd47c184 ]

Currently, we are only guaranteed to send RECLAIM_COMPLETE if we have
open state to recover. Fix the client to always send RECLAIM_COMPLETE
after setting up the lease.

Fixes: fce5c838e133 ("nfs41: RECLAIM_COMPLETE functionality")
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/nfs4state.c

index 2df0a1be5974faa851f68715cb9354106cb11ad9..dcb2c8b4a14d9e8bc6c788b34c50d85a6604bda3 100644 (file)
@@ -1656,6 +1656,7 @@ static void nfs4_state_mark_reclaim_helper(struct nfs_client *clp,
 
 static void nfs4_state_start_reclaim_reboot(struct nfs_client *clp)
 {
+       set_bit(NFS4CLNT_RECLAIM_REBOOT, &clp->cl_state);
        /* Mark all delegations for reclaim */
        nfs_delegation_mark_reclaim(clp);
        nfs4_state_mark_reclaim_helper(clp, nfs4_state_mark_reclaim_reboot);