]> err.no Git - linux-2.6/blobdiff - net/sched/act_api.c
Merge branch 'stealer/ipvs/for-davem' of git://git.stealer.net/linux-2.6
[linux-2.6] / net / sched / act_api.c
index 0b8eb235bc136fff1eeb349f72c549a5ce4df3df..26c7e1f9a35002d3bf2dd9f825d9a54041bb96a5 100644 (file)
@@ -41,7 +41,7 @@ void tcf_hash_destroy(struct tcf_common *p, struct tcf_hashinfo *hinfo)
                        return;
                }
        }
-       BUG_TRAP(0);
+       WARN_ON(1);
 }
 EXPORT_SYMBOL(tcf_hash_destroy);
 
@@ -205,10 +205,9 @@ struct tcf_common *tcf_hash_check(u32 index, struct tc_action *a, int bind,
 {
        struct tcf_common *p = NULL;
        if (index && (p = tcf_hash_lookup(index, hinfo)) != NULL) {
-               if (bind) {
+               if (bind)
                        p->tcfc_bindcnt++;
-                       p->tcfc_refcnt++;
-               }
+               p->tcfc_refcnt++;
                a->priv = p;
        }
        return p;
@@ -951,7 +950,7 @@ done:
 
 static int tc_ctl_action(struct sk_buff *skb, struct nlmsghdr *n, void *arg)
 {
-       struct net *net = skb->sk->sk_net;
+       struct net *net = sock_net(skb->sk);
        struct nlattr *tca[TCA_ACT_MAX + 1];
        u32 pid = skb ? NETLINK_CB(skb).pid : 0;
        int ret = 0, ovr = 0;
@@ -1029,7 +1028,7 @@ find_dump_kind(struct nlmsghdr *n)
 static int
 tc_dump_action(struct sk_buff *skb, struct netlink_callback *cb)
 {
-       struct net *net = skb->sk->sk_net;
+       struct net *net = sock_net(skb->sk);
        struct nlmsghdr *nlh;
        unsigned char *b = skb_tail_pointer(skb);
        struct nlattr *nest;