diff options
Diffstat (limited to 'net/sched/sch_api.c')
| -rw-r--r-- | net/sched/sch_api.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c index 31570b9a6e9a..0b6489291140 100644 --- a/net/sched/sch_api.c +++ b/net/sched/sch_api.c | |||
| @@ -15,7 +15,6 @@ | |||
| 15 | * Jamal Hadi Salim <hadi@nortelnetworks.com>: 990601: ingress support | 15 | * Jamal Hadi Salim <hadi@nortelnetworks.com>: 990601: ingress support |
| 16 | */ | 16 | */ |
| 17 | 17 | ||
| 18 | #include <linux/config.h> | ||
| 19 | #include <linux/module.h> | 18 | #include <linux/module.h> |
| 20 | #include <linux/types.h> | 19 | #include <linux/types.h> |
| 21 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
| @@ -196,14 +195,14 @@ struct Qdisc *qdisc_lookup(struct net_device *dev, u32 handle) | |||
| 196 | { | 195 | { |
| 197 | struct Qdisc *q; | 196 | struct Qdisc *q; |
| 198 | 197 | ||
| 199 | read_lock_bh(&qdisc_tree_lock); | 198 | read_lock(&qdisc_tree_lock); |
| 200 | list_for_each_entry(q, &dev->qdisc_list, list) { | 199 | list_for_each_entry(q, &dev->qdisc_list, list) { |
| 201 | if (q->handle == handle) { | 200 | if (q->handle == handle) { |
| 202 | read_unlock_bh(&qdisc_tree_lock); | 201 | read_unlock(&qdisc_tree_lock); |
| 203 | return q; | 202 | return q; |
| 204 | } | 203 | } |
| 205 | } | 204 | } |
| 206 | read_unlock_bh(&qdisc_tree_lock); | 205 | read_unlock(&qdisc_tree_lock); |
| 207 | return NULL; | 206 | return NULL; |
| 208 | } | 207 | } |
| 209 | 208 | ||
| @@ -431,7 +430,7 @@ qdisc_create(struct net_device *dev, u32 handle, struct rtattr **tca, int *errp) | |||
| 431 | } | 430 | } |
| 432 | #endif | 431 | #endif |
| 433 | 432 | ||
| 434 | err = -EINVAL; | 433 | err = -ENOENT; |
| 435 | if (ops == NULL) | 434 | if (ops == NULL) |
| 436 | goto err_out; | 435 | goto err_out; |
| 437 | 436 | ||
| @@ -838,7 +837,7 @@ static int tc_dump_qdisc(struct sk_buff *skb, struct netlink_callback *cb) | |||
| 838 | continue; | 837 | continue; |
| 839 | if (idx > s_idx) | 838 | if (idx > s_idx) |
| 840 | s_q_idx = 0; | 839 | s_q_idx = 0; |
| 841 | read_lock_bh(&qdisc_tree_lock); | 840 | read_lock(&qdisc_tree_lock); |
| 842 | q_idx = 0; | 841 | q_idx = 0; |
| 843 | list_for_each_entry(q, &dev->qdisc_list, list) { | 842 | list_for_each_entry(q, &dev->qdisc_list, list) { |
| 844 | if (q_idx < s_q_idx) { | 843 | if (q_idx < s_q_idx) { |
| @@ -847,12 +846,12 @@ static int tc_dump_qdisc(struct sk_buff *skb, struct netlink_callback *cb) | |||
| 847 | } | 846 | } |
| 848 | if (tc_fill_qdisc(skb, q, q->parent, NETLINK_CB(cb->skb).pid, | 847 | if (tc_fill_qdisc(skb, q, q->parent, NETLINK_CB(cb->skb).pid, |
| 849 | cb->nlh->nlmsg_seq, NLM_F_MULTI, RTM_NEWQDISC) <= 0) { | 848 | cb->nlh->nlmsg_seq, NLM_F_MULTI, RTM_NEWQDISC) <= 0) { |
| 850 | read_unlock_bh(&qdisc_tree_lock); | 849 | read_unlock(&qdisc_tree_lock); |
| 851 | goto done; | 850 | goto done; |
| 852 | } | 851 | } |
| 853 | q_idx++; | 852 | q_idx++; |
| 854 | } | 853 | } |
| 855 | read_unlock_bh(&qdisc_tree_lock); | 854 | read_unlock(&qdisc_tree_lock); |
| 856 | } | 855 | } |
| 857 | 856 | ||
| 858 | done: | 857 | done: |
| @@ -1075,7 +1074,7 @@ static int tc_dump_tclass(struct sk_buff *skb, struct netlink_callback *cb) | |||
| 1075 | s_t = cb->args[0]; | 1074 | s_t = cb->args[0]; |
| 1076 | t = 0; | 1075 | t = 0; |
| 1077 | 1076 | ||
| 1078 | read_lock_bh(&qdisc_tree_lock); | 1077 | read_lock(&qdisc_tree_lock); |
| 1079 | list_for_each_entry(q, &dev->qdisc_list, list) { | 1078 | list_for_each_entry(q, &dev->qdisc_list, list) { |
| 1080 | if (t < s_t || !q->ops->cl_ops || | 1079 | if (t < s_t || !q->ops->cl_ops || |
| 1081 | (tcm->tcm_parent && | 1080 | (tcm->tcm_parent && |
| @@ -1097,7 +1096,7 @@ static int tc_dump_tclass(struct sk_buff *skb, struct netlink_callback *cb) | |||
| 1097 | break; | 1096 | break; |
| 1098 | t++; | 1097 | t++; |
| 1099 | } | 1098 | } |
| 1100 | read_unlock_bh(&qdisc_tree_lock); | 1099 | read_unlock(&qdisc_tree_lock); |
| 1101 | 1100 | ||
| 1102 | cb->args[0] = t; | 1101 | cb->args[0] = t; |
| 1103 | 1102 | ||
