summaryrefslogtreecommitdiffstats
path: root/drivers/target/target_core_tmr.c
diff options
context:
space:
mode:
authorNicholas Bellinger2013-11-14 03:34:55 +0100
committerNicholas Bellinger2013-11-14 03:34:55 +0100
commitee480683d975973e3ff679850871e00e011c4a96 (patch)
treea7c5d09f34b8f606fb3f709eb15615513d5981db /drivers/target/target_core_tmr.c
parenttarget: Fix delayed Task Aborted Status (TAS) handling bug (diff)
downloadkernel-qcow2-linux-ee480683d975973e3ff679850871e00e011c4a96.tar.gz
kernel-qcow2-linux-ee480683d975973e3ff679850871e00e011c4a96.tar.xz
kernel-qcow2-linux-ee480683d975973e3ff679850871e00e011c4a96.zip
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(
pr_debug("LUN_RESET: SCSI-2 Released reservation\n");
}
- spin_lock_irq(&dev->stats_lock);
- dev->num_resets++;
- spin_unlock_irq(&dev->stats_lock);
+ atomic_long_inc(&dev->num_resets);
pr_debug("LUN_RESET: %s for [%s] Complete\n",
(preempt_and_abort_list) ? "Preempt" : "TMR",