diff options
author | Madhuparna Bhowmik <madhuparnabhowmik10@gmail.com> | 2020-02-19 01:24:25 +0530 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-02-18 12:46:26 -0800 |
commit | 7790614616458b6dd3d90652acfa6b7443ee7041 (patch) | |
tree | 584ae4aa8a1d21bc08e64b6027c60de21ba98db9 /net | |
parent | 9facfdb5467382a21fc0bd4211ced26c06f28832 (diff) |
meter.c: Use built-in RCU list checking
hlist_for_each_entry_rcu() has built-in RCU and lock checking.
Pass cond argument to list_for_each_entry_rcu() to silence
false lockdep warning when CONFIG_PROVE_RCU_LIST is enabled
by default.
Signed-off-by: Madhuparna Bhowmik <madhuparnabhowmik10@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/openvswitch/meter.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/openvswitch/meter.c b/net/openvswitch/meter.c index 3323b79ff548..5010d1ddd4bd 100644 --- a/net/openvswitch/meter.c +++ b/net/openvswitch/meter.c @@ -61,7 +61,8 @@ static struct dp_meter *lookup_meter(const struct datapath *dp, struct hlist_head *head; head = meter_hash_bucket(dp, meter_id); - hlist_for_each_entry_rcu(meter, head, dp_hash_node) { + hlist_for_each_entry_rcu(meter, head, dp_hash_node, + lockdep_ovsl_is_held()) { if (meter->id == meter_id) return meter; } |