Skip to content

Commit

Permalink
nfs,rcu: convert call_rcu(nfs_free_delegation_callback) to kfree_rcu()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Lai Jiangshan authored and Trond Myklebust committed May 27, 2011
1 parent 4b8ee2b commit 26f04dd
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions fs/nfs/delegation.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
Expand Down

0 comments on commit 26f04dd

Please sign in to comment.