|
@@ -4498,22 +4498,22 @@ nfs4_has_reclaimed_state(const char *name)
|
|
|
/*
|
|
|
* failure => all reset bets are off, nfserr_no_grace...
|
|
|
*/
|
|
|
-int
|
|
|
+struct nfs4_client_reclaim *
|
|
|
nfs4_client_to_reclaim(const char *name)
|
|
|
{
|
|
|
unsigned int strhashval;
|
|
|
- struct nfs4_client_reclaim *crp = NULL;
|
|
|
+ struct nfs4_client_reclaim *crp;
|
|
|
|
|
|
dprintk("NFSD nfs4_client_to_reclaim NAME: %.*s\n", HEXDIR_LEN, name);
|
|
|
crp = alloc_reclaim();
|
|
|
- if (!crp)
|
|
|
- return 0;
|
|
|
- strhashval = clientstr_hashval(name);
|
|
|
- INIT_LIST_HEAD(&crp->cr_strhash);
|
|
|
- list_add(&crp->cr_strhash, &reclaim_str_hashtbl[strhashval]);
|
|
|
- memcpy(crp->cr_recdir, name, HEXDIR_LEN);
|
|
|
- reclaim_str_hashtbl_size++;
|
|
|
- return 1;
|
|
|
+ if (crp) {
|
|
|
+ strhashval = clientstr_hashval(name);
|
|
|
+ INIT_LIST_HEAD(&crp->cr_strhash);
|
|
|
+ list_add(&crp->cr_strhash, &reclaim_str_hashtbl[strhashval]);
|
|
|
+ memcpy(crp->cr_recdir, name, HEXDIR_LEN);
|
|
|
+ reclaim_str_hashtbl_size++;
|
|
|
+ }
|
|
|
+ return crp;
|
|
|
}
|
|
|
|
|
|
void
|