summaryrefslogtreecommitdiff
path: root/fs/nfsd
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@redhat.com>2012-03-06 23:43:36 +0400
committerJ. Bruce Fields <bfields@redhat.com>2012-03-07 03:13:24 +0400
commit393d8ed80f0e9b7edad737053a5fb375f0bf4849 (patch)
tree91069f3a1fa60811638341b46a8d87b715899758 /fs/nfsd
parent1255a8f36cb16a02540bdad91c0bc0971b9fb429 (diff)
downloadlinux-393d8ed80f0e9b7edad737053a5fb375f0bf4849.tar.xz
nfsd4: purge stable client records with insufficient state
To escape having your stable storage record purged at the end of the grace period, it's not sufficient to simply have performed a setclientid_confirm; you also need to meet the same requirements as someone creating a new record: either you should have done an open or open reclaim (in the 4.0 case) or a reclaim_complete (in the 4.1 case). Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd')
-rw-r--r--fs/nfsd/nfs4state.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 207c3bd266aa..c9c446d682ae 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -4415,7 +4415,9 @@ nfs4_has_reclaimed_state(const char *name, bool use_exchange_id)
struct nfs4_client *clp;
clp = find_confirmed_client_by_str(name, strhashval);
- return clp ? 1 : 0;
+ if (!clp)
+ return 0;
+ return clp->cl_firststate;
}
/*