diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2010-02-12 06:41:39 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-02-17 03:03:27 -0500 |
commit | dc4c2c31053ba5bf685d273cd62ecca406dddb2d (patch) | |
tree | c74ac486ee668eec2a24d9a4191a855fb0eed8af | |
parent | f6ca057f1bfe251d944505fc5ba4df3762802539 (diff) |
net: remove INIT_RCU_HEAD() usage
call_rcu() will unconditionally reinitialize RCU head anyway.
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/core/drop_monitor.c | 1 | ||||
-rw-r--r-- | net/ipv6/sit.c | 1 | ||||
-rw-r--r-- | net/ipv6/xfrm6_tunnel.c | 1 | ||||
-rw-r--r-- | net/netlabel/netlabel_domainhash.c | 1 | ||||
-rw-r--r-- | net/netlabel/netlabel_unlabeled.c | 3 | ||||
-rw-r--r-- | net/sctp/bind_addr.c | 1 | ||||
-rw-r--r-- | net/sctp/ipv6.c | 1 | ||||
-rw-r--r-- | net/sctp/protocol.c | 1 |
8 files changed, 0 insertions, 10 deletions
diff --git a/net/core/drop_monitor.c b/net/core/drop_monitor.c index b8e9d3a86887..f8c874975350 100644 --- a/net/core/drop_monitor.c +++ b/net/core/drop_monitor.c | |||
@@ -296,7 +296,6 @@ static int dropmon_net_event(struct notifier_block *ev_block, | |||
296 | 296 | ||
297 | new_stat->dev = dev; | 297 | new_stat->dev = dev; |
298 | new_stat->last_rx = jiffies; | 298 | new_stat->last_rx = jiffies; |
299 | INIT_RCU_HEAD(&new_stat->rcu); | ||
300 | spin_lock(&trace_state_lock); | 299 | spin_lock(&trace_state_lock); |
301 | list_add_rcu(&new_stat->list, &hw_stats_list); | 300 | list_add_rcu(&new_stat->list, &hw_stats_list); |
302 | spin_unlock(&trace_state_lock); | 301 | spin_unlock(&trace_state_lock); |
diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c index 52ffd29cb93f..96eb2d4641c4 100644 --- a/net/ipv6/sit.c +++ b/net/ipv6/sit.c | |||
@@ -363,7 +363,6 @@ ipip6_tunnel_add_prl(struct ip_tunnel *t, struct ip_tunnel_prl *a, int chg) | |||
363 | goto out; | 363 | goto out; |
364 | } | 364 | } |
365 | 365 | ||
366 | INIT_RCU_HEAD(&p->rcu_head); | ||
367 | p->next = t->prl; | 366 | p->next = t->prl; |
368 | p->addr = a->addr; | 367 | p->addr = a->addr; |
369 | p->flags = a->flags; | 368 | p->flags = a->flags; |
diff --git a/net/ipv6/xfrm6_tunnel.c b/net/ipv6/xfrm6_tunnel.c index ddce21e3459b..fa85a7d22dc4 100644 --- a/net/ipv6/xfrm6_tunnel.c +++ b/net/ipv6/xfrm6_tunnel.c | |||
@@ -161,7 +161,6 @@ alloc_spi: | |||
161 | if (!x6spi) | 161 | if (!x6spi) |
162 | goto out; | 162 | goto out; |
163 | 163 | ||
164 | INIT_RCU_HEAD(&x6spi->rcu_head); | ||
165 | memcpy(&x6spi->addr, saddr, sizeof(x6spi->addr)); | 164 | memcpy(&x6spi->addr, saddr, sizeof(x6spi->addr)); |
166 | x6spi->spi = spi; | 165 | x6spi->spi = spi; |
167 | atomic_set(&x6spi->refcnt, 1); | 166 | atomic_set(&x6spi->refcnt, 1); |
diff --git a/net/netlabel/netlabel_domainhash.c b/net/netlabel/netlabel_domainhash.c index c5d9f97ef217..0bfeaab88ef5 100644 --- a/net/netlabel/netlabel_domainhash.c +++ b/net/netlabel/netlabel_domainhash.c | |||
@@ -315,7 +315,6 @@ int netlbl_domhsh_add(struct netlbl_dom_map *entry, | |||
315 | entry_old = netlbl_domhsh_search_def(entry->domain); | 315 | entry_old = netlbl_domhsh_search_def(entry->domain); |
316 | if (entry_old == NULL) { | 316 | if (entry_old == NULL) { |
317 | entry->valid = 1; | 317 | entry->valid = 1; |
318 | INIT_RCU_HEAD(&entry->rcu); | ||
319 | 318 | ||
320 | if (entry->domain != NULL) { | 319 | if (entry->domain != NULL) { |
321 | u32 bkt = netlbl_domhsh_hash(entry->domain); | 320 | u32 bkt = netlbl_domhsh_hash(entry->domain); |
diff --git a/net/netlabel/netlabel_unlabeled.c b/net/netlabel/netlabel_unlabeled.c index 98ed22ee2ff4..852d9d7976b9 100644 --- a/net/netlabel/netlabel_unlabeled.c +++ b/net/netlabel/netlabel_unlabeled.c | |||
@@ -327,7 +327,6 @@ static int netlbl_unlhsh_add_addr4(struct netlbl_unlhsh_iface *iface, | |||
327 | entry->list.addr = addr->s_addr & mask->s_addr; | 327 | entry->list.addr = addr->s_addr & mask->s_addr; |
328 | entry->list.mask = mask->s_addr; | 328 | entry->list.mask = mask->s_addr; |
329 | entry->list.valid = 1; | 329 | entry->list.valid = 1; |
330 | INIT_RCU_HEAD(&entry->rcu); | ||
331 | entry->secid = secid; | 330 | entry->secid = secid; |
332 | 331 | ||
333 | spin_lock(&netlbl_unlhsh_lock); | 332 | spin_lock(&netlbl_unlhsh_lock); |
@@ -373,7 +372,6 @@ static int netlbl_unlhsh_add_addr6(struct netlbl_unlhsh_iface *iface, | |||
373 | entry->list.addr.s6_addr32[3] &= mask->s6_addr32[3]; | 372 | entry->list.addr.s6_addr32[3] &= mask->s6_addr32[3]; |
374 | ipv6_addr_copy(&entry->list.mask, mask); | 373 | ipv6_addr_copy(&entry->list.mask, mask); |
375 | entry->list.valid = 1; | 374 | entry->list.valid = 1; |
376 | INIT_RCU_HEAD(&entry->rcu); | ||
377 | entry->secid = secid; | 375 | entry->secid = secid; |
378 | 376 | ||
379 | spin_lock(&netlbl_unlhsh_lock); | 377 | spin_lock(&netlbl_unlhsh_lock); |
@@ -410,7 +408,6 @@ static struct netlbl_unlhsh_iface *netlbl_unlhsh_add_iface(int ifindex) | |||
410 | INIT_LIST_HEAD(&iface->addr4_list); | 408 | INIT_LIST_HEAD(&iface->addr4_list); |
411 | INIT_LIST_HEAD(&iface->addr6_list); | 409 | INIT_LIST_HEAD(&iface->addr6_list); |
412 | iface->valid = 1; | 410 | iface->valid = 1; |
413 | INIT_RCU_HEAD(&iface->rcu); | ||
414 | 411 | ||
415 | spin_lock(&netlbl_unlhsh_lock); | 412 | spin_lock(&netlbl_unlhsh_lock); |
416 | if (ifindex > 0) { | 413 | if (ifindex > 0) { |
diff --git a/net/sctp/bind_addr.c b/net/sctp/bind_addr.c index 13a6fba41077..bef133731683 100644 --- a/net/sctp/bind_addr.c +++ b/net/sctp/bind_addr.c | |||
@@ -186,7 +186,6 @@ int sctp_add_bind_addr(struct sctp_bind_addr *bp, union sctp_addr *new, | |||
186 | addr->valid = 1; | 186 | addr->valid = 1; |
187 | 187 | ||
188 | INIT_LIST_HEAD(&addr->list); | 188 | INIT_LIST_HEAD(&addr->list); |
189 | INIT_RCU_HEAD(&addr->rcu); | ||
190 | 189 | ||
191 | /* We always hold a socket lock when calling this function, | 190 | /* We always hold a socket lock when calling this function, |
192 | * and that acts as a writer synchronizing lock. | 191 | * and that acts as a writer synchronizing lock. |
diff --git a/net/sctp/ipv6.c b/net/sctp/ipv6.c index cc50fbe99291..1d7ac70ba39f 100644 --- a/net/sctp/ipv6.c +++ b/net/sctp/ipv6.c | |||
@@ -381,7 +381,6 @@ static void sctp_v6_copy_addrlist(struct list_head *addrlist, | |||
381 | addr->a.v6.sin6_scope_id = dev->ifindex; | 381 | addr->a.v6.sin6_scope_id = dev->ifindex; |
382 | addr->valid = 1; | 382 | addr->valid = 1; |
383 | INIT_LIST_HEAD(&addr->list); | 383 | INIT_LIST_HEAD(&addr->list); |
384 | INIT_RCU_HEAD(&addr->rcu); | ||
385 | list_add_tail(&addr->list, addrlist); | 384 | list_add_tail(&addr->list, addrlist); |
386 | } | 385 | } |
387 | } | 386 | } |
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c index 9687177b026b..e771690f6d5d 100644 --- a/net/sctp/protocol.c +++ b/net/sctp/protocol.c | |||
@@ -188,7 +188,6 @@ static void sctp_v4_copy_addrlist(struct list_head *addrlist, | |||
188 | addr->a.v4.sin_addr.s_addr = ifa->ifa_local; | 188 | addr->a.v4.sin_addr.s_addr = ifa->ifa_local; |
189 | addr->valid = 1; | 189 | addr->valid = 1; |
190 | INIT_LIST_HEAD(&addr->list); | 190 | INIT_LIST_HEAD(&addr->list); |
191 | INIT_RCU_HEAD(&addr->rcu); | ||
192 | list_add_tail(&addr->list, addrlist); | 191 | list_add_tail(&addr->list, addrlist); |
193 | } | 192 | } |
194 | } | 193 | } |