diff options
author | David S. Miller <davem@davemloft.net> | 2018-01-17 00:00:25 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-01-17 00:10:42 -0500 |
commit | c02b3741eb99a1ec733e6134c53ba59e43e19e97 (patch) | |
tree | ff7dd96c32dec2abe530e7101378443dabcb8962 /net/sched/sch_api.c | |
parent | 7018d1b3f20fb4308ed9bc577160cb8ffb79b62a (diff) | |
parent | 8cbab92dff778e516064c13113ca15d4869ec883 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Overlapping changes all over.
The mini-qdisc bits were a little bit tricky, however.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/sch_api.c')
-rw-r--r-- | net/sched/sch_api.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c index 0038a1c44ee9..7dffa9dce28b 100644 --- a/net/sched/sch_api.c +++ b/net/sched/sch_api.c | |||
@@ -1094,17 +1094,6 @@ static struct Qdisc *qdisc_create(struct net_device *dev, | |||
1094 | goto err_out5; | 1094 | goto err_out5; |
1095 | } | 1095 | } |
1096 | 1096 | ||
1097 | if (qdisc_is_percpu_stats(sch)) { | ||
1098 | sch->cpu_bstats = | ||
1099 | netdev_alloc_pcpu_stats(struct gnet_stats_basic_cpu); | ||
1100 | if (!sch->cpu_bstats) | ||
1101 | goto err_out4; | ||
1102 | |||
1103 | sch->cpu_qstats = alloc_percpu(struct gnet_stats_queue); | ||
1104 | if (!sch->cpu_qstats) | ||
1105 | goto err_out4; | ||
1106 | } | ||
1107 | |||
1108 | if (tca[TCA_STAB]) { | 1097 | if (tca[TCA_STAB]) { |
1109 | stab = qdisc_get_stab(tca[TCA_STAB], extack); | 1098 | stab = qdisc_get_stab(tca[TCA_STAB], extack); |
1110 | if (IS_ERR(stab)) { | 1099 | if (IS_ERR(stab)) { |
@@ -1151,7 +1140,7 @@ err_out5: | |||
1151 | ops->destroy(sch); | 1140 | ops->destroy(sch); |
1152 | err_out3: | 1141 | err_out3: |
1153 | dev_put(dev); | 1142 | dev_put(dev); |
1154 | kfree((char *) sch - sch->padded); | 1143 | qdisc_free(sch); |
1155 | err_out2: | 1144 | err_out2: |
1156 | module_put(ops->owner); | 1145 | module_put(ops->owner); |
1157 | err_out: | 1146 | err_out: |
@@ -1159,8 +1148,6 @@ err_out: | |||
1159 | return NULL; | 1148 | return NULL; |
1160 | 1149 | ||
1161 | err_out4: | 1150 | err_out4: |
1162 | free_percpu(sch->cpu_bstats); | ||
1163 | free_percpu(sch->cpu_qstats); | ||
1164 | /* | 1151 | /* |
1165 | * Any broken qdiscs that would require a ops->reset() here? | 1152 | * Any broken qdiscs that would require a ops->reset() here? |
1166 | * The qdisc was never in action so it shouldn't be necessary. | 1153 | * The qdisc was never in action so it shouldn't be necessary. |