]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
nfsd4: purge stable client records with insufficient state
authorJ. Bruce Fields <bfields@redhat.com>
Tue, 6 Mar 2012 19:43:36 +0000 (14:43 -0500)
committerJ. Bruce Fields <bfields@redhat.com>
Tue, 6 Mar 2012 23:13:24 +0000 (18:13 -0500)
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>
fs/nfsd/nfs4state.c

index 207c3bd266aa0914903386c4afa52dc362a46833..c9c446d682aeda07769802734bea7ddcbd62dfe9 100644 (file)
@@ -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;
 }
 
 /*