nfs,rcu: convert call_rcu(nfs_free_delegation_callback) to kfree_rcu()
authorLai Jiangshan <laijs@cn.fujitsu.com>
Sun, 1 May 2011 13:21:54 +0000 (06:21 -0700)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Fri, 27 May 2011 21:42:46 +0000 (17:42 -0400)
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 <laijs@cn.fujitsu.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/delegation.c

index bbbc6bf..dd25c2a 100644 (file)
 #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);
 }
 
 /**