提交 01a87d91 编写于 作者: B Benny Halevy 提交者: J. Bruce Fields

nfsd: no need to unhash_stid before free

idr_remove is about to be called before kmem_cache_free so unhashing it
is redundant
Signed-off-by: NBenny Halevy <bhalevy@primarydata.com>
Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
上级 7ebe40f2
......@@ -672,7 +672,6 @@ static void unhash_open_stateid(struct nfs4_ol_stateid *stp)
static void release_open_stateid(struct nfs4_ol_stateid *stp)
{
unhash_open_stateid(stp);
unhash_stid(&stp->st_stid);
free_generic_stateid(stp);
}
......@@ -694,7 +693,6 @@ static void release_last_closed_stateid(struct nfs4_openowner *oo)
struct nfs4_ol_stateid *s = oo->oo_last_closed_stid;
if (s) {
unhash_stid(&s->st_stid);
free_generic_stateid(s);
oo->oo_last_closed_stid = NULL;
}
......@@ -3998,10 +3996,9 @@ nfsd4_close(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
nfsd4_close_open_stateid(stp);
if (cstate->minorversion) {
unhash_stid(&stp->st_stid);
if (cstate->minorversion)
free_generic_stateid(stp);
} else
else
oo->oo_last_closed_stid = stp;
if (list_empty(&oo->oo_owner.so_stateids)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册