The var was supposed to be protected by data_lock
but it wasn't so in all instances. It's actually
not necessary to have a spinlock protected
num_peers so drop it.
All instances of num_peers are already within
conf_mutex sections so use that.
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
struct list_head peers;
wait_queue_head_t peer_mapping_wq;
struct list_head peers;
wait_queue_head_t peer_mapping_wq;
- /* number of created peers; protected by data_lock */
+ /* protected by conf_mutex */
int num_peers;
struct work_struct offchan_tx_work;
int num_peers;
struct work_struct offchan_tx_work;
addr, vdev_id, ret);
return ret;
}
addr, vdev_id, ret);
return ret;
}
- spin_lock_bh(&ar->data_lock);
- spin_unlock_bh(&ar->data_lock);
- spin_lock_bh(&ar->data_lock);
- spin_unlock_bh(&ar->data_lock);
list_del(&peer->list);
kfree(peer);
}
list_del(&peer->list);
kfree(peer);
}
spin_unlock_bh(&ar->data_lock);
spin_unlock_bh(&ar->data_lock);
}
/************************/
}
/************************/