Commit 77906146 authored by Madhuparna Bhowmik's avatar Madhuparna Bhowmik Committed by David S. Miller

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: default avatarMadhuparna Bhowmik <madhuparnabhowmik10@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9facfdb5
...@@ -61,7 +61,8 @@ static struct dp_meter *lookup_meter(const struct datapath *dp, ...@@ -61,7 +61,8 @@ static struct dp_meter *lookup_meter(const struct datapath *dp,
struct hlist_head *head; struct hlist_head *head;
head = meter_hash_bucket(dp, meter_id); 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) if (meter->id == meter_id)
return meter; return meter;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment