]> git.karo-electronics.de Git - linux-beck.git/commitdiff
net: don't use INIT_RCU_HEAD
authorAlexey Dobriyan <adobriyan@gmail.com>
Tue, 28 Oct 2008 20:25:09 +0000 (13:25 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 28 Oct 2008 20:25:09 +0000 (13:25 -0700)
call_rcu() will unconditionally rewrite RCU head anyway.
Applies to
struct neigh_parms
struct neigh_table
struct net
struct cipso_v4_doi
struct in_ifaddr
struct in_device
rt->u.dst

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>
net/core/neighbour.c
net/core/net_namespace.c
net/ipv4/cipso_ipv4.c
net/ipv4/devinet.c
net/ipv4/route.c

index 1dc728b38589699d4b85b215208bf6f0bde154f9..b337a937ea529674af85c5a6e799c212ddd3103c 100644 (file)
@@ -1340,7 +1340,6 @@ struct neigh_parms *neigh_parms_alloc(struct net_device *dev,
        if (p) {
                p->tbl            = tbl;
                atomic_set(&p->refcnt, 1);
-               INIT_RCU_HEAD(&p->rcu_head);
                p->reachable_time =
                                neigh_rand_reach_time(p->base_reachable_time);
 
@@ -1412,7 +1411,6 @@ void neigh_table_init_no_netlink(struct neigh_table *tbl)
        tbl->parms.net = &init_net;
 #endif
        atomic_set(&tbl->parms.refcnt, 1);
-       INIT_RCU_HEAD(&tbl->parms.rcu_head);
        tbl->parms.reachable_time =
                          neigh_rand_reach_time(tbl->parms.base_reachable_time);
 
index f1d07b5c1e17257c21f6669588946a0df08b77a4..861b4cbf40dba86e631bb5a197cac60b53ff83c5 100644 (file)
@@ -47,7 +47,6 @@ static __net_init int setup_net(struct net *net)
                goto out;
 
        ng->len = INITIAL_NET_GEN_PTRS;
-       INIT_RCU_HEAD(&ng->rcu);
        rcu_assign_pointer(net->gen, ng);
 
        error = 0;
@@ -446,7 +445,6 @@ int net_assign_generic(struct net *net, int id, void *data)
         */
 
        ng->len = id;
-       INIT_RCU_HEAD(&ng->rcu);
        memcpy(&ng->ptr, &old_ng->ptr, old_ng->len);
 
        rcu_assign_pointer(net->gen, ng);
index 490e035c6d90d231aee5514ac8d4a3f262ef0a4d..4bcec7f772518e2e7c0357377f5292b3f62c35d5 100644 (file)
@@ -490,7 +490,6 @@ int cipso_v4_doi_add(struct cipso_v4_doi *doi_def)
        }
 
        atomic_set(&doi_def->refcount, 1);
-       INIT_RCU_HEAD(&doi_def->rcu);
 
        spin_lock(&cipso_v4_doi_list_lock);
        if (cipso_v4_doi_search(doi_def->doi) != NULL)
index 56fce3ab6c55263c727357ee54c18bf70221451a..0bff576d2918dab3097ab66b1f72369d890268e9 100644 (file)
@@ -112,13 +112,7 @@ static inline void devinet_sysctl_unregister(struct in_device *idev)
 
 static struct in_ifaddr *inet_alloc_ifa(void)
 {
-       struct in_ifaddr *ifa = kzalloc(sizeof(*ifa), GFP_KERNEL);
-
-       if (ifa) {
-               INIT_RCU_HEAD(&ifa->rcu_head);
-       }
-
-       return ifa;
+       return kzalloc(sizeof(struct in_ifaddr), GFP_KERNEL);
 }
 
 static void inet_rcu_free_ifa(struct rcu_head *head)
@@ -161,7 +155,6 @@ static struct in_device *inetdev_init(struct net_device *dev)
        in_dev = kzalloc(sizeof(*in_dev), GFP_KERNEL);
        if (!in_dev)
                goto out;
-       INIT_RCU_HEAD(&in_dev->rcu_head);
        memcpy(&in_dev->cnf, dev_net(dev)->ipv4.devconf_dflt,
                        sizeof(in_dev->cnf));
        in_dev->cnf.sysctl = NULL;
index ffb2c57054327f7b6c1f4bdfdb53e91f66c6acc0..e59b4dcf6778d1661592c0fec1923e684e7fd04f 100644 (file)
@@ -1386,7 +1386,6 @@ void ip_rt_redirect(__be32 old_gw, __be32 daddr, __be32 new_gw,
 
                                /* Copy all the information. */
                                *rt = *rth;
-                               INIT_RCU_HEAD(&rt->u.dst.rcu_head);
                                rt->u.dst.__use         = 1;
                                atomic_set(&rt->u.dst.__refcnt, 1);
                                rt->u.dst.child         = NULL;