Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 267189
b: refs/heads/master
c: a50d2ad
h: refs/heads/master
i:
  267187: c717962
v: v3
  • Loading branch information
J. Bruce Fields committed Oct 17, 2011
1 parent f2be2a3 commit c9e450a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 14 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: 01cd4afadbf376de07d364a632cc82a0fc5e8655
refs/heads/master: a50d2ad1721c0c785e9a74c0003ca044de6868a5
23 changes: 10 additions & 13 deletions trunk/fs/nfsd/nfs4state.c
Original file line number Diff line number Diff line change
Expand Up @@ -931,9 +931,6 @@ renew_client_locked(struct nfs4_client *clp)
return;
}

/*
* Move client to the end to the LRU list.
*/
dprintk("renewing client (clientid %08x/%08x)\n",
clp->cl_clientid.cl_boot,
clp->cl_clientid.cl_id);
Expand Down Expand Up @@ -1220,8 +1217,10 @@ find_confirmed_client(clientid_t *clid)
unsigned int idhashval = clientid_hashval(clid->cl_id);

list_for_each_entry(clp, &conf_id_hashtbl[idhashval], cl_idhash) {
if (same_clid(&clp->cl_clientid, clid))
if (same_clid(&clp->cl_clientid, clid)) {
renew_client(clp);
return clp;
}
}
return NULL;
}
Expand Down Expand Up @@ -2372,11 +2371,15 @@ same_owner_str(struct nfs4_stateowner *sop, struct xdr_netobj *owner,
static struct nfs4_openowner *
find_openstateowner_str(unsigned int hashval, struct nfsd4_open *open)
{
struct nfs4_stateowner *so = NULL;
struct nfs4_stateowner *so;
struct nfs4_openowner *oo;

list_for_each_entry(so, &open_ownerstr_hashtbl[hashval], so_strhash) {
if (same_owner_str(so, &open->op_owner, &open->op_clientid))
return container_of(so, struct nfs4_openowner, oo_owner);
if (same_owner_str(so, &open->op_owner, &open->op_clientid)) {
oo = openowner(so);
renew_client(oo->oo_owner.so_client);
return oo;
}
}
return NULL;
}
Expand Down Expand Up @@ -2536,7 +2539,6 @@ nfsd4_process_open1(struct nfsd4_compound_state *cstate,
open->op_openowner = oo;
}
list_del_init(&oo->oo_close_lru);
renew_client(oo->oo_owner.so_client);
return nfs_ok;
}

Expand Down Expand Up @@ -2970,7 +2972,6 @@ nfsd4_renew(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
dprintk("nfsd4_renew: clientid not found!\n");
goto out;
}
renew_client(clp);
status = nfserr_cb_path_down;
if (!list_empty(&clp->cl_delegations)
&& clp->cl_cb_state != NFSD4_CB_UP)
Expand Down Expand Up @@ -3275,7 +3276,6 @@ nfs4_preprocess_stateid_op(struct nfsd4_compound_state *cstate,
status = nfs4_check_delegmode(dp, flags);
if (status)
goto out;
renew_client(dp->dl_stid.sc_client);
if (filpp) {
*filpp = dp->dl_file->fi_deleg_file;
BUG_ON(!*filpp);
Expand All @@ -3293,7 +3293,6 @@ nfs4_preprocess_stateid_op(struct nfsd4_compound_state *cstate,
status = nfs4_check_openmode(stp, flags);
if (status)
goto out;
renew_client(stp->st_stateowner->so_client);
if (filpp) {
if (flags & RD_STATE)
*filpp = find_readable_file(stp->st_file);
Expand Down Expand Up @@ -3412,7 +3411,6 @@ nfs4_preprocess_seqid_op(struct nfsd4_compound_state *cstate, u32 seqid,
return status;
*stpp = openlockstateid(s);
cstate->replay_owner = (*stpp)->st_stateowner;
renew_client((*stpp)->st_stateowner->so_client);

return nfs4_seqid_op_checks(cstate, stateid, seqid, *stpp);
}
Expand Down Expand Up @@ -3643,7 +3641,6 @@ nfsd4_delegreturn(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
status = check_stateid_generation(stateid, &dp->dl_stid.sc_stateid, nfsd4_has_session(cstate));
if (status)
goto out;
renew_client(dp->dl_stid.sc_client);

unhash_delegation(dp);
out:
Expand Down

0 comments on commit c9e450a

Please sign in to comment.