net: use WARN() for the WARN_ON in commit b6b39e8f3fbbb
[safe/jmp/linux-2.6] / net / core / flow.c
index a77531c..9601587 100644 (file)
@@ -23,7 +23,6 @@
 #include <linux/mutex.h>
 #include <net/flow.h>
 #include <asm/atomic.h>
-#include <asm/semaphore.h>
 #include <linux/security.h>
 
 struct flow_cache_entry {
@@ -166,7 +165,7 @@ static int flow_key_compare(struct flowi *key1, struct flowi *key2)
        return 0;
 }
 
-void *flow_cache_lookup(struct flowi *key, u16 family, u8 dir,
+void *flow_cache_lookup(struct net *net, struct flowi *key, u16 family, u8 dir,
                        flow_resolve_t resolver)
 {
        struct flow_cache_entry *fle, **head;
@@ -226,7 +225,7 @@ nocache:
                void *obj;
                atomic_t *obj_ref;
 
-               err = resolver(key, family, dir, &obj, &obj_ref);
+               err = resolver(net, key, family, dir, &obj, &obj_ref);
 
                if (fle && !err) {
                        fle->genid = atomic_read(&flow_cache_genid);
@@ -299,7 +298,7 @@ void flow_cache_flush(void)
        init_completion(&info.completion);
 
        local_bh_disable();
-       smp_call_function(flow_cache_flush_per_cpu, &info, 1, 0);
+       smp_call_function(flow_cache_flush_per_cpu, &info, 0);
        flow_cache_flush_tasklet((unsigned long)&info);
        local_bh_enable();
 
@@ -308,7 +307,7 @@ void flow_cache_flush(void)
        put_online_cpus();
 }
 
-static void __devinit flow_cache_cpu_prepare(int cpu)
+static void __init flow_cache_cpu_prepare(int cpu)
 {
        struct tasklet_struct *tasklet;
        unsigned long order;