]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
meter.c: Use built-in RCU list checking
authorMadhuparna Bhowmik <madhuparnabhowmik10@gmail.com>
Tue, 18 Feb 2020 19:54:25 +0000 (01:24 +0530)
committerDavid S. Miller <davem@davemloft.net>
Tue, 18 Feb 2020 20:46:26 +0000 (12:46 -0800)
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>
net/openvswitch/meter.c

index 3323b79ff548dfbf7842b3ac3b825b7d0f7dcfde..5010d1ddd4bdb1f8b5fd34dbc97c7b3803552563 100644 (file)
@@ -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;
        }