Commit 6a9a5ec1 authored by Lance Roy's avatar Lance Roy Committed by Jeff Kirsher

i40e: Replace spin_is_locked() with lockdep

lockdep_assert_held() is better suited to checking locking requirements,
since it won't get confused when someone else holds the lock. This is
also a step towards possibly removing spin_is_locked().
Signed-off-by: default avatarLance Roy <ldr709@gmail.com>
Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 15cef309
...@@ -1493,8 +1493,7 @@ int i40e_del_mac_filter(struct i40e_vsi *vsi, const u8 *macaddr) ...@@ -1493,8 +1493,7 @@ int i40e_del_mac_filter(struct i40e_vsi *vsi, const u8 *macaddr)
bool found = false; bool found = false;
int bkt; int bkt;
WARN(!spin_is_locked(&vsi->mac_filter_hash_lock), lockdep_assert_held(&vsi->mac_filter_hash_lock);
"Missing mac_filter_hash_lock\n");
hash_for_each_safe(vsi->mac_filter_hash, bkt, h, f, hlist) { hash_for_each_safe(vsi->mac_filter_hash, bkt, h, f, hlist) {
if (ether_addr_equal(macaddr, f->macaddr)) { if (ether_addr_equal(macaddr, f->macaddr)) {
__i40e_del_filter(vsi, f); __i40e_del_filter(vsi, f);
......
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