nfsd: have nfsd4_find_reclaim_client take a char * argument

Currently, it takes a client pointer, but later we're going to need to
search for these records without knowing whether a matching client even
exists.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
This commit is contained in:
Jeff Layton
2012-11-12 15:00:52 -05:00
committed by J. Bruce Fields
parent 8b0554e9a2
commit 278c931cb0
3 changed files with 6 additions and 9 deletions

View File

@@ -4537,19 +4537,16 @@ nfs4_release_reclaim(void)
/*
* called from OPEN, CLAIM_PREVIOUS with a new clientid. */
struct nfs4_client_reclaim *
nfsd4_find_reclaim_client(struct nfs4_client *clp)
nfsd4_find_reclaim_client(const char *recdir)
{
unsigned int strhashval;
struct nfs4_client_reclaim *crp = NULL;
dprintk("NFSD: nfs4_find_reclaim_client for %.*s with recdir %s\n",
clp->cl_name.len, clp->cl_name.data,
clp->cl_recdir);
dprintk("NFSD: nfs4_find_reclaim_client for recdir %s\n", recdir);
/* find clp->cl_name in reclaim_str_hashtbl */
strhashval = clientstr_hashval(clp->cl_recdir);
strhashval = clientstr_hashval(recdir);
list_for_each_entry(crp, &reclaim_str_hashtbl[strhashval], cr_strhash) {
if (same_name(crp->cr_recdir, clp->cl_recdir)) {
if (same_name(crp->cr_recdir, recdir)) {
return crp;
}
}