Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 252449
b: refs/heads/master
c: 53ab670
h: refs/heads/master
i:
  252447: 102abfd
v: v3
  • Loading branch information
Nicholas Bellinger authored and James Bottomley committed May 24, 2011
1 parent aec0caa commit 18c497f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 97868c8905a1537153d406c4a3aa39a503a5c299
refs/heads/master: 53ab6709b4d35b1924240854d794482fd7d33d4a
4 changes: 2 additions & 2 deletions trunk/drivers/target/target_core_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,13 +150,13 @@ int transport_get_lun_for_cmd(

{
struct se_device *dev = se_lun->lun_se_dev;
spin_lock(&dev->stats_lock);
spin_lock_irq(&dev->stats_lock);
dev->num_cmds++;
if (se_cmd->data_direction == DMA_TO_DEVICE)
dev->write_bytes += se_cmd->data_length;
else if (se_cmd->data_direction == DMA_FROM_DEVICE)
dev->read_bytes += se_cmd->data_length;
spin_unlock(&dev->stats_lock);
spin_unlock_irq(&dev->stats_lock);
}

/*
Expand Down
7 changes: 4 additions & 3 deletions trunk/drivers/target/target_core_tmr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit 18c497f

Please sign in to comment.