scsi: target: Fix multiple LUN_RESET handling
[linux-2.6-block.git] / drivers / target / target_core_device.c
index f6e58410ec3f9ced3e2844b9035fa8d13d71225c..aeb03136773d50dd517e7efacb24e3ae876c23a2 100644 (file)
@@ -782,6 +782,7 @@ struct se_device *target_alloc_device(struct se_hba *hba, const char *name)
        spin_lock_init(&dev->t10_alua.lba_map_lock);
 
        INIT_WORK(&dev->delayed_cmd_work, target_do_delayed_work);
+       mutex_init(&dev->lun_reset_mutex);
 
        dev->t10_wwn.t10_dev = dev;
        /*