Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 334076
b: refs/heads/master
c: 0d22f68
h: refs/heads/master
v: v3
  • Loading branch information
J. Bruce Fields committed Oct 1, 2012
1 parent ea30b18 commit 28052ec
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6a3b15634279aa6740f9b829d25db32024b2ca7c
refs/heads/master: 0d22f68f02c10d5d10ec5712917e5828b001a822
18 changes: 10 additions & 8 deletions trunk/fs/nfsd/nfs4state.c
Original file line number Diff line number Diff line change
Expand Up @@ -1118,7 +1118,7 @@ unhash_client_locked(struct nfs4_client *clp)
}

static void
expire_client(struct nfs4_client *clp)
destroy_client(struct nfs4_client *clp)
{
struct nfs4_openowner *oo;
struct nfs4_delegation *dp;
Expand Down Expand Up @@ -1152,6 +1152,12 @@ expire_client(struct nfs4_client *clp)
spin_unlock(&client_lock);
}

static void expire_client(struct nfs4_client *clp)
{
nfsd4_client_record_remove(clp);
destroy_client(clp);
}

static void copy_verf(struct nfs4_client *target, nfs4_verifier *source)
{
memcpy(target->cl_verifier.data, source->data,
Expand Down Expand Up @@ -2273,10 +2279,8 @@ nfsd4_setclientid_confirm(struct svc_rqst *rqstp,
unsigned int hash = clientstr_hashval(unconf->cl_recdir);

conf = find_confirmed_client_by_str(unconf->cl_recdir, hash);
if (conf) {
nfsd4_client_record_remove(conf);
if (conf)
expire_client(conf);
}
move_to_confirmed(unconf);
nfsd4_probe_callback(unconf);
}
Expand Down Expand Up @@ -3191,7 +3195,6 @@ nfs4_laundromat(void)
clp = list_entry(pos, struct nfs4_client, cl_lru);
dprintk("NFSD: purging unused client (clientid %08x)\n",
clp->cl_clientid.cl_id);
nfsd4_client_record_remove(clp);
expire_client(clp);
}
spin_lock(&recall_lock);
Expand Down Expand Up @@ -4562,7 +4565,6 @@ void nfsd_forget_clients(u64 num)

nfs4_lock_state();
list_for_each_entry_safe(clp, next, &client_lru, cl_lru) {
nfsd4_client_record_remove(clp);
expire_client(clp);
if (++count == num)
break;
Expand Down Expand Up @@ -4787,11 +4789,11 @@ __nfs4_state_shutdown(void)
for (i = 0; i < CLIENT_HASH_SIZE; i++) {
while (!list_empty(&conf_id_hashtbl[i])) {
clp = list_entry(conf_id_hashtbl[i].next, struct nfs4_client, cl_idhash);
expire_client(clp);
destroy_client(clp);
}
while (!list_empty(&unconf_str_hashtbl[i])) {
clp = list_entry(unconf_str_hashtbl[i].next, struct nfs4_client, cl_strhash);
expire_client(clp);
destroy_client(clp);
}
}
INIT_LIST_HEAD(&reaplist);
Expand Down

0 comments on commit 28052ec

Please sign in to comment.