]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/netfilter/nf_conntrack_core.c
[ARM] 3500/1: fix PXA27x DMA allocation priority
[linux-2.6-omap-h63xx.git] / net / netfilter / nf_conntrack_core.c
index 0ae281d9bfc3f16cda2b7e36c34b109145045d1a..f9b83f91371ac27ac2c127fea81ed0bbc6e4f0c5 100644 (file)
@@ -90,8 +90,8 @@ static int nf_conntrack_vmalloc;
 static unsigned int nf_conntrack_next_id;
 static unsigned int nf_conntrack_expect_next_id;
 #ifdef CONFIG_NF_CONNTRACK_EVENTS
-struct notifier_block *nf_conntrack_chain;
-struct notifier_block *nf_conntrack_expect_chain;
+ATOMIC_NOTIFIER_HEAD(nf_conntrack_chain);
+ATOMIC_NOTIFIER_HEAD(nf_conntrack_expect_chain);
 
 DEFINE_PER_CPU(struct nf_conntrack_ecache, nf_conntrack_ecache);
 
@@ -103,7 +103,7 @@ __nf_ct_deliver_cached_events(struct nf_conntrack_ecache *ecache)
        DEBUGP("ecache: delivering events for %p\n", ecache->ct);
        if (nf_ct_is_confirmed(ecache->ct) && !nf_ct_is_dying(ecache->ct)
            && ecache->events)
-               notifier_call_chain(&nf_conntrack_chain, ecache->events,
+               atomic_notifier_call_chain(&nf_conntrack_chain, ecache->events,
                                    ecache->ct);
 
        ecache->events = 0;
@@ -146,7 +146,7 @@ static void nf_ct_event_cache_flush(void)
        struct nf_conntrack_ecache *ecache;
        int cpu;
 
-       for_each_cpu(cpu) {
+       for_each_possible_cpu(cpu) {
                ecache = &per_cpu(nf_conntrack_ecache, cpu);
                if (ecache->ct)
                        nf_ct_put(ecache->ct);
@@ -178,9 +178,6 @@ static struct {
        /* allocated slab cache + modules which uses this slab cache */
        int use;
 
-       /* Initialization */
-       int (*init_conntrack)(struct nf_conn *, u_int32_t);
-
 } nf_ct_cache[NF_CT_F_NUM];
 
 /* protect members of nf_ct_cache except of "use" */
@@ -208,10 +205,8 @@ nf_ct_proto_find_get(u_int16_t l3proto, u_int8_t protocol)
 
        preempt_disable();
        p = __nf_ct_proto_find(l3proto, protocol);
-       if (p) {
-               if (!try_module_get(p->me))
-                       p = &nf_conntrack_generic_protocol;
-       }
+       if (!try_module_get(p->me))
+               p = &nf_conntrack_generic_protocol;
        preempt_enable();
        
        return p;
@@ -229,10 +224,8 @@ nf_ct_l3proto_find_get(u_int16_t l3proto)
 
        preempt_disable();
        p = __nf_ct_l3proto_find(l3proto);
-       if (p) {
-               if (!try_module_get(p->me))
-                       p = &nf_conntrack_generic_l3proto;
-       }
+       if (!try_module_get(p->me))
+               p = &nf_conntrack_generic_l3proto;
        preempt_enable();
 
        return p;