Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
[safe/jmp/linux-2.6] / net / sched / cls_route.c
index e3d8455..694dcd8 100644 (file)
@@ -10,6 +10,7 @@
  */
 
 #include <linux/module.h>
+#include <linux/slab.h>
 #include <linux/types.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
@@ -137,7 +138,7 @@ static int route4_classify(struct sk_buff *skb, struct tcf_proto *tp,
        u32 id, h;
        int iif, dont_cache = 0;
 
-       if ((dst = skb->dst) == NULL)
+       if ((dst = skb_dst(skb)) == NULL)
                goto failure;
 
        id = dst->tclassid;
@@ -260,7 +261,7 @@ route4_delete_filter(struct tcf_proto *tp, struct route4_filter *f)
 
 static void route4_destroy(struct tcf_proto *tp)
 {
-       struct route4_head *head = xchg(&tp->root, NULL);
+       struct route4_head *head = tp->root;
        int h1, h2;
 
        if (head == NULL)