From: Lai Jiangshan Date: Sun, 1 May 2011 13:21:54 +0000 (-0700) Subject: nfs,rcu: convert call_rcu(nfs_free_delegation_callback) to kfree_rcu() X-Git-Tag: firefly_0821_release~7613^2~1000^2~6 X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=26f04dde681c6a48b2bacfc5fe01fef204419b0c;p=firefly-linux-kernel-4.4.55.git 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: Lai Jiangshan Signed-off-by: Paul E. McKenney Cc: Trond Myklebust Signed-off-by: Trond Myklebust --- diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c index bbbc6bf5cb2e..dd25c2aec375 100644 --- a/fs/nfs/delegation.c +++ b/fs/nfs/delegation.c @@ -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); } /**