提交 26f04dde 编写于 作者: L Lai Jiangshan 提交者: Trond Myklebust

nfs,rcu: convert call_rcu(nfs_free_delegation_callback) to kfree_rcu()

The rcu callback nfs_free_delegation_callback() just calls a kfree(),
so we use kfree_rcu() instead of the call_rcu(nfs_free_delegation_callback).
Signed-off-by: NLai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
上级 4b8ee2b8
......@@ -21,25 +21,13 @@
#include "delegation.h"
#include "internal.h"
static void nfs_do_free_delegation(struct nfs_delegation *delegation)
{
kfree(delegation);
}
static void nfs_free_delegation_callback(struct rcu_head *head)
{
struct nfs_delegation *delegation = container_of(head, struct nfs_delegation, rcu);
nfs_do_free_delegation(delegation);
}
static void nfs_free_delegation(struct nfs_delegation *delegation)
{
if (delegation->cred) {
put_rpccred(delegation->cred);
delegation->cred = NULL;
}
call_rcu(&delegation->rcu, nfs_free_delegation_callback);
kfree_rcu(delegation, rcu);
}
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册