aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfs4state.c
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2012-11-12 15:00:54 -0500
committerJ. Bruce Fields <bfields@redhat.com>2012-11-12 18:55:11 -0500
commit772a9bbbb5769c646c74452ef21df538bbe2ebf0 (patch)
tree6e29c687607641582d77544361512494a2d2513a /fs/nfsd/nfs4state.c
parentce30e5392fcb26b6aa53bb16d06da1d7d8bb0863 (diff)
nfsd: make nfs4_client_to_reclaim return a pointer to the reclaim record
Later callers will need to make changes to the record. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/nfs4state.c')
-rw-r--r--fs/nfsd/nfs4state.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 24dcda2b327c..1c6f82e4335e 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -4498,22 +4498,22 @@ nfs4_has_reclaimed_state(const char *name)
4498/* 4498/*
4499 * failure => all reset bets are off, nfserr_no_grace... 4499 * failure => all reset bets are off, nfserr_no_grace...
4500 */ 4500 */
4501int 4501struct nfs4_client_reclaim *
4502nfs4_client_to_reclaim(const char *name) 4502nfs4_client_to_reclaim(const char *name)
4503{ 4503{
4504 unsigned int strhashval; 4504 unsigned int strhashval;
4505 struct nfs4_client_reclaim *crp = NULL; 4505 struct nfs4_client_reclaim *crp;
4506 4506
4507 dprintk("NFSD nfs4_client_to_reclaim NAME: %.*s\n", HEXDIR_LEN, name); 4507 dprintk("NFSD nfs4_client_to_reclaim NAME: %.*s\n", HEXDIR_LEN, name);
4508 crp = alloc_reclaim(); 4508 crp = alloc_reclaim();
4509 if (!crp) 4509 if (crp) {
4510 return 0; 4510 strhashval = clientstr_hashval(name);
4511 strhashval = clientstr_hashval(name); 4511 INIT_LIST_HEAD(&crp->cr_strhash);
4512 INIT_LIST_HEAD(&crp->cr_strhash); 4512 list_add(&crp->cr_strhash, &reclaim_str_hashtbl[strhashval]);
4513 list_add(&crp->cr_strhash, &reclaim_str_hashtbl[strhashval]); 4513 memcpy(crp->cr_recdir, name, HEXDIR_LEN);
4514 memcpy(crp->cr_recdir, name, HEXDIR_LEN); 4514 reclaim_str_hashtbl_size++;
4515 reclaim_str_hashtbl_size++; 4515 }
4516 return 1; 4516 return crp;
4517} 4517}
4518 4518
4519void 4519void