aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/target/target_core_tmr.c
diff options
context:
space:
mode:
authorNicholas Bellinger <nab@linux-iscsi.org>2013-11-13 21:34:55 -0500
committerNicholas Bellinger <nab@linux-iscsi.org>2013-11-13 21:34:55 -0500
commitee480683d975973e3ff679850871e00e011c4a96 (patch)
treea7c5d09f34b8f606fb3f709eb15615513d5981db /drivers/target/target_core_tmr.c
parent29f4c090079f442ea2723d292e4e64f0b6ac1f27 (diff)
target: Convert se_device statistics to atomic_long_t
This patch converts the handful of se_device statistics to type atomic_long_t, instead of using se_device->stats_lock when incrementing these values. More importantly, go ahead and drop the spinlock usage within transport_lookup_cmd_lun() fast-path code. Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/target_core_tmr.c')
-rw-r--r--drivers/target/target_core_tmr.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/target/target_core_tmr.c b/drivers/target/target_core_tmr.c
index 250009909d49..70c638f730af 100644
--- a/drivers/target/target_core_tmr.c
+++ b/drivers/target/target_core_tmr.c
@@ -386,9 +386,7 @@ int core_tmr_lun_reset(
386 pr_debug("LUN_RESET: SCSI-2 Released reservation\n"); 386 pr_debug("LUN_RESET: SCSI-2 Released reservation\n");
387 } 387 }
388 388
389 spin_lock_irq(&dev->stats_lock); 389 atomic_long_inc(&dev->num_resets);
390 dev->num_resets++;
391 spin_unlock_irq(&dev->stats_lock);
392 390
393 pr_debug("LUN_RESET: %s for [%s] Complete\n", 391 pr_debug("LUN_RESET: %s for [%s] Complete\n",
394 (preempt_and_abort_list) ? "Preempt" : "TMR", 392 (preempt_and_abort_list) ? "Preempt" : "TMR",