]> git.baikalelectronics.ru Git - kernel.git/commit
net: sched: refactor tcf_block_find() into standalone functions
authorVlad Buslov <vladbu@mellanox.com>
Mon, 11 Feb 2019 08:55:47 +0000 (10:55 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 12 Feb 2019 18:41:33 +0000 (13:41 -0500)
commit6c4bd220cbe325c3bf83787d40cbf43ae3f53744
treef9e3a685f3b226ec7e27917c12f9d0ea0b8c1b25
parentbd4c98182a15aad4d1205c5e83d532d761ac971d
net: sched: refactor tcf_block_find() into standalone functions

Refactor tcf_block_find() code into three standalone functions:
- __tcf_qdisc_find() to lookup Qdisc and increment its reference counter.
- __tcf_qdisc_cl_find() to lookup class.
- __tcf_block_find() to lookup block and increment its reference counter.

This change is necessary to allow netlink tc rule update handlers to call
these functions directly in order to conditionally take rtnl lock
according to Qdisc class ops flags before calling any of class ops
functions.

Signed-off-by: Vlad Buslov <vladbu@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/cls_api.c