diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2022-09-23 17:06:08 +0300 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2022-09-23 17:06:08 +0300 |
commit | 69604fe76e58c9d195e48b41d019b07fc27ce9d7 (patch) | |
tree | c9d1e7cfe406a8f168c3aceaf989eea0275d3045 /net/sched/sch_tbf.c | |
parent | 50b2d49bafa16e6311ab2da82f5aafc5f9ada99b (diff) | |
parent | 189e7d876e48d7c791fe1c9c01516f70f5621a9f (diff) | |
download | linux-69604fe76e58c9d195e48b41d019b07fc27ce9d7.tar.xz |
Merge tag 'kvm-s390-master-6.0-2' of https://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux into HEAD
More pci fixes
Fix for a code analyser warning
Diffstat (limited to 'net/sched/sch_tbf.c')
-rw-r--r-- | net/sched/sch_tbf.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/sched/sch_tbf.c b/net/sched/sch_tbf.c index 72102277449e..36079fdde2cb 100644 --- a/net/sched/sch_tbf.c +++ b/net/sched/sch_tbf.c @@ -356,6 +356,7 @@ static int tbf_change(struct Qdisc *sch, struct nlattr *opt, struct nlattr *tb[TCA_TBF_MAX + 1]; struct tc_tbf_qopt *qopt; struct Qdisc *child = NULL; + struct Qdisc *old = NULL; struct psched_ratecfg rate; struct psched_ratecfg peak; u64 max_size; @@ -447,7 +448,7 @@ static int tbf_change(struct Qdisc *sch, struct nlattr *opt, sch_tree_lock(sch); if (child) { qdisc_tree_flush_backlog(q->qdisc); - qdisc_put(q->qdisc); + old = q->qdisc; q->qdisc = child; } q->limit = qopt->limit; @@ -467,6 +468,7 @@ static int tbf_change(struct Qdisc *sch, struct nlattr *opt, memcpy(&q->peak, &peak, sizeof(struct psched_ratecfg)); sch_tree_unlock(sch); + qdisc_put(old); err = 0; tbf_offload_change(sch); |