|
@@ -55,7 +55,8 @@ struct se_tmr_req *core_tmr_alloc_req(
|
|
|
{
|
|
|
struct se_tmr_req *tmr;
|
|
|
|
|
|
- tmr = kmem_cache_zalloc(se_tmr_req_cache, GFP_KERNEL);
|
|
|
+ tmr = kmem_cache_zalloc(se_tmr_req_cache, (in_interrupt()) ?
|
|
|
+ GFP_ATOMIC : GFP_KERNEL);
|
|
|
if (!(tmr)) {
|
|
|
printk(KERN_ERR "Unable to allocate struct se_tmr_req\n");
|
|
|
return ERR_PTR(-ENOMEM);
|
|
@@ -398,9 +399,9 @@ int core_tmr_lun_reset(
|
|
|
printk(KERN_INFO "LUN_RESET: SCSI-2 Released reservation\n");
|
|
|
}
|
|
|
|
|
|
- spin_lock(&dev->stats_lock);
|
|
|
+ spin_lock_irq(&dev->stats_lock);
|
|
|
dev->num_resets++;
|
|
|
- spin_unlock(&dev->stats_lock);
|
|
|
+ spin_unlock_irq(&dev->stats_lock);
|
|
|
|
|
|
DEBUG_LR("LUN_RESET: %s for [%s] Complete\n",
|
|
|
(preempt_and_abort_list) ? "Preempt" : "TMR",
|