Should fix some sleep-while-atomic issues
Signed-off-by: Felix Fietkau <nbd@nbd.name>
static int swdev_id;
static struct list_head swdevs;
-static DEFINE_SPINLOCK(swdevs_lock);
+static DEFINE_MUTEX(swdevs_lock);
struct swconfig_callback;
struct swconfig_callback {
static inline void
swconfig_lock(void)
{
- spin_lock(&swdevs_lock);
+ mutex_lock(&swdevs_lock);
}
static inline void
swconfig_unlock(void)
{
- spin_unlock(&swdevs_lock);
+ mutex_unlock(&swdevs_lock);
}
static struct switch_dev *