diff options
author | Lai Jiangshan <laijs@cn.fujitsu.com> | 2011-03-15 06:05:02 -0400 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2011-05-08 01:50:51 -0400 |
commit | 1231f0baa547a541a7481119323b7f964dda4788 (patch) | |
tree | 4f03036990f55084650cda8f2cd17c759c6b2542 /net/sctp/protocol.c | |
parent | 37b6b935e96e837ccc60812c03e9f92e7dce2e61 (diff) |
net,rcu: convert call_rcu(sctp_local_addr_free) to kfree_rcu()
The rcu callback sctp_local_addr_free() just calls a kfree(),
so we use kfree_rcu() instead of the call_rcu(sctp_local_addr_free).
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Diffstat (limited to 'net/sctp/protocol.c')
-rw-r--r-- | net/sctp/protocol.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c index d5bf91d04f63..065d99958ced 100644 --- a/net/sctp/protocol.c +++ b/net/sctp/protocol.c | |||
@@ -230,13 +230,6 @@ static void sctp_free_local_addr_list(void) | |||
230 | } | 230 | } |
231 | } | 231 | } |
232 | 232 | ||
233 | void sctp_local_addr_free(struct rcu_head *head) | ||
234 | { | ||
235 | struct sctp_sockaddr_entry *e = container_of(head, | ||
236 | struct sctp_sockaddr_entry, rcu); | ||
237 | kfree(e); | ||
238 | } | ||
239 | |||
240 | /* Copy the local addresses which are valid for 'scope' into 'bp'. */ | 233 | /* Copy the local addresses which are valid for 'scope' into 'bp'. */ |
241 | int sctp_copy_local_addr_list(struct sctp_bind_addr *bp, sctp_scope_t scope, | 234 | int sctp_copy_local_addr_list(struct sctp_bind_addr *bp, sctp_scope_t scope, |
242 | gfp_t gfp, int copy_flags) | 235 | gfp_t gfp, int copy_flags) |
@@ -681,7 +674,7 @@ static int sctp_inetaddr_event(struct notifier_block *this, unsigned long ev, | |||
681 | } | 674 | } |
682 | spin_unlock_bh(&sctp_local_addr_lock); | 675 | spin_unlock_bh(&sctp_local_addr_lock); |
683 | if (found) | 676 | if (found) |
684 | call_rcu(&addr->rcu, sctp_local_addr_free); | 677 | kfree_rcu(addr, rcu); |
685 | break; | 678 | break; |
686 | } | 679 | } |
687 | 680 | ||