aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/sch_api.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2018-01-17 00:00:25 -0500
committerDavid S. Miller <davem@davemloft.net>2018-01-17 00:10:42 -0500
commitc02b3741eb99a1ec733e6134c53ba59e43e19e97 (patch)
treeff7dd96c32dec2abe530e7101378443dabcb8962 /net/sched/sch_api.c
parent7018d1b3f20fb4308ed9bc577160cb8ffb79b62a (diff)
parent8cbab92dff778e516064c13113ca15d4869ec883 (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.c15
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);
1152err_out3: 1141err_out3:
1153 dev_put(dev); 1142 dev_put(dev);
1154 kfree((char *) sch - sch->padded); 1143 qdisc_free(sch);
1155err_out2: 1144err_out2:
1156 module_put(ops->owner); 1145 module_put(ops->owner);
1157err_out: 1146err_out:
@@ -1159,8 +1148,6 @@ err_out:
1159 return NULL; 1148 return NULL;
1160 1149
1161err_out4: 1150err_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.