summaryrefslogtreecommitdiff
path: root/net/sched/sch_api.c
diff options
context:
space:
mode:
authorJiri Pirko <jiri@mellanox.com>2017-10-13 15:01:04 +0300
committerDavid S. Miller <davem@davemloft.net>2017-10-16 23:00:41 +0300
commit74e3be6021d22df2ffcb691eae1affeb2bd0128e (patch)
tree11a0c965050d8031cc34cd526abc29da7e29acf1 /net/sched/sch_api.c
parent1abf272022cf1d18469405f47b4ec49c6a3125db (diff)
downloadlinux-74e3be6021d22df2ffcb691eae1affeb2bd0128e.tar.xz
net: sched: use tcf_block_q helper to get q pointer for sch_tree_lock
Use tcf_block_q helper to get q pointer to be used for direct call of sch_tree_lock/unlock instead of tcf_tree_lock/unlock. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/sch_api.c')
-rw-r--r--net/sched/sch_api.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c
index aa82116ed10c..a9ac912f1d67 100644
--- a/net/sched/sch_api.c
+++ b/net/sched/sch_api.c
@@ -1661,9 +1661,11 @@ static int tcf_node_bind(struct tcf_proto *tp, void *n, struct tcf_walker *arg)
struct tcf_bind_args *a = (void *)arg;
if (tp->ops->bind_class) {
- tcf_tree_lock(tp);
+ struct Qdisc *q = tcf_block_q(tp->chain->block);
+
+ sch_tree_lock(q);
tp->ops->bind_class(n, a->classid, a->cl);
- tcf_tree_unlock(tp);
+ sch_tree_unlock(q);
}
return 0;
}