diff options
author | Lai Jiangshan <laijs@cn.fujitsu.com> | 2011-05-01 09:21:54 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2011-05-27 17:42:46 -0400 |
commit | 26f04dde681c6a48b2bacfc5fe01fef204419b0c (patch) | |
tree | b8a6f047b6e5743ab795076e3cc0d0a5a72840e6 /fs/nfs/delegation.c | |
parent | 4b8ee2b82e8b0b6e17ee33feb74fcdb5c6d8dbdd (diff) |
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 <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>
Diffstat (limited to 'fs/nfs/delegation.c')
-rw-r--r-- | fs/nfs/delegation.c | 14 |
1 files changed, 1 insertions, 13 deletions
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 @@ | |||
21 | #include "delegation.h" | 21 | #include "delegation.h" |
22 | #include "internal.h" | 22 | #include "internal.h" |
23 | 23 | ||
24 | static void nfs_do_free_delegation(struct nfs_delegation *delegation) | ||
25 | { | ||
26 | kfree(delegation); | ||
27 | } | ||
28 | |||
29 | static void nfs_free_delegation_callback(struct rcu_head *head) | ||
30 | { | ||
31 | struct nfs_delegation *delegation = container_of(head, struct nfs_delegation, rcu); | ||
32 | |||
33 | nfs_do_free_delegation(delegation); | ||
34 | } | ||
35 | |||
36 | static void nfs_free_delegation(struct nfs_delegation *delegation) | 24 | static void nfs_free_delegation(struct nfs_delegation *delegation) |
37 | { | 25 | { |
38 | if (delegation->cred) { | 26 | if (delegation->cred) { |
39 | put_rpccred(delegation->cred); | 27 | put_rpccred(delegation->cred); |
40 | delegation->cred = NULL; | 28 | delegation->cred = NULL; |
41 | } | 29 | } |
42 | call_rcu(&delegation->rcu, nfs_free_delegation_callback); | 30 | kfree_rcu(delegation, rcu); |
43 | } | 31 | } |
44 | 32 | ||
45 | /** | 33 | /** |