提交 ce30e539 编写于 作者: J Jeff Layton 提交者: J. Bruce Fields

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: NJeff Layton <jlayton@redhat.com>
Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
上级 278c931c
......@@ -4516,6 +4516,14 @@ nfs4_client_to_reclaim(const char *name)
return 1;
}
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)
{
......@@ -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);
......
......@@ -465,6 +465,7 @@ extern __be32 nfs4_preprocess_stateid_op(struct net *net,
extern void nfs4_lock_state(void);
extern void nfs4_unlock_state(void);
extern int nfs4_in_grace(void);
void nfs4_remove_reclaim_record(struct nfs4_client_reclaim *);
extern void nfs4_release_reclaim(void);
extern struct nfs4_client_reclaim *nfsd4_find_reclaim_client(const char *recdir);
extern __be32 nfs4_check_open_reclaim(clientid_t *clid, bool sessions);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册