V4L/DVB (13590): cpia: convert it to use proc_fops
[safe/jmp/linux-2.6] / net / sched / act_api.c
index 2dfb3e7..64f5e32 100644 (file)
@@ -598,7 +598,7 @@ int tcf_action_copy_stats(struct sk_buff *skb, struct tc_action *a,
                goto errout;
 
        /* compat_mode being true specifies a call that is supposed
-        * to add additional backward compatiblity statistic TLVs.
+        * to add additional backward compatibility statistic TLVs.
         */
        if (compat_mode) {
                if (a->type == TCA_OLD_COMPAT)
@@ -618,7 +618,8 @@ int tcf_action_copy_stats(struct sk_buff *skb, struct tc_action *a,
                        goto errout;
 
        if (gnet_stats_copy_basic(&d, &h->tcf_bstats) < 0 ||
-           gnet_stats_copy_rate_est(&d, &h->tcf_rate_est) < 0 ||
+           gnet_stats_copy_rate_est(&d, &h->tcf_bstats,
+                                    &h->tcf_rate_est) < 0 ||
            gnet_stats_copy_queue(&d, &h->tcf_qstats) < 0)
                goto errout;
 
@@ -968,7 +969,7 @@ static int tc_ctl_action(struct sk_buff *skb, struct nlmsghdr *n, void *arg)
        u32 pid = skb ? NETLINK_CB(skb).pid : 0;
        int ret = 0, ovr = 0;
 
-       if (net != &init_net)
+       if (!net_eq(net, &init_net))
                return -EINVAL;
 
        ret = nlmsg_parse(n, sizeof(struct tcamsg), tca, TCA_ACT_MAX, NULL);
@@ -1051,7 +1052,7 @@ tc_dump_action(struct sk_buff *skb, struct netlink_callback *cb)
        struct tcamsg *t = (struct tcamsg *) NLMSG_DATA(cb->nlh);
        struct nlattr *kind = find_dump_kind(cb->nlh);
 
-       if (net != &init_net)
+       if (!net_eq(net, &init_net))
                return 0;
 
        if (kind == NULL) {