summaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfs4state.c
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2012-11-12 15:00:53 -0500
committerJ. Bruce Fields <bfields@redhat.com>2012-11-12 18:55:11 -0500
commitce30e5392fcb26b6aa53bb16d06da1d7d8bb0863 (patch)
treee5af94c019f84c460203f7e8ef449e7d1d74515c /fs/nfsd/nfs4state.c
parent278c931cb05ae624df8c82b6bdfbb0e03392cde7 (diff)
downloadlinux-ce30e5392fcb26b6aa53bb16d06da1d7d8bb0863.tar.bz2
nfsd: break out reclaim record removal into separate function
We'll need to be able to call this from nfs4recover.c eventually. 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.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 18e554942da3..24dcda2b327c 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -4517,6 +4517,14 @@ nfs4_client_to_reclaim(const char *name)
}
void
+nfs4_remove_reclaim_record(struct nfs4_client_reclaim *crp)
+{
+ list_del(&crp->cr_strhash);
+ kfree(crp);
+ reclaim_str_hashtbl_size--;
+}
+
+void
nfs4_release_reclaim(void)
{
struct nfs4_client_reclaim *crp = NULL;
@@ -4526,9 +4534,7 @@ nfs4_release_reclaim(void)
while (!list_empty(&reclaim_str_hashtbl[i])) {
crp = list_entry(reclaim_str_hashtbl[i].next,
struct nfs4_client_reclaim, cr_strhash);
- list_del(&crp->cr_strhash);
- kfree(crp);
- reclaim_str_hashtbl_size--;
+ nfs4_remove_reclaim_record(crp);
}
}
BUG_ON(reclaim_str_hashtbl_size);