aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/target/target_core_device.c
diff options
context:
space:
mode:
authorNicholas Bellinger <nab@linux-iscsi.org>2015-06-22 23:44:05 -0700
committerNicholas Bellinger <nab@linux-iscsi.org>2015-06-22 23:54:10 -0700
commit1adff1b3a7f75a1c255b7fcab5676edf29d4a5d8 (patch)
tree7fe5b62dba64a17e68dfd50b2e2745a2751811ff /drivers/target/target_core_device.c
parenttarget: use 'se_dev_entry' when allocating UAs (diff)
downloadlinux-dev-1adff1b3a7f75a1c255b7fcab5676edf29d4a5d8.tar.xz
linux-dev-1adff1b3a7f75a1c255b7fcab5676edf29d4a5d8.zip
target: Convert se_lun->lun_deve_lock to normal spinlock
This patch converts se_lun->lun_deve_lock acquire/release access to use a normal, non bottom-half spin_lock_t for protecting se_lun->lun_deve_list access. Reported-by: Christoph Hellwig <hch@lst.de> Cc: Hannes Reinecke <hare@suse.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/target_core_device.c')
-rw-r--r--drivers/target/target_core_device.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/target/target_core_device.c b/drivers/target/target_core_device.c
index ed084023e7d4..b6df5b9a6890 100644
--- a/drivers/target/target_core_device.c
+++ b/drivers/target/target_core_device.c
@@ -352,10 +352,10 @@ int core_enable_device_list_for_node(
hlist_add_head_rcu(&new->link, &nacl->lun_entry_hlist);
mutex_unlock(&nacl->lun_entry_mutex);
- spin_lock_bh(&lun->lun_deve_lock);
+ spin_lock(&lun->lun_deve_lock);
list_del(&orig->lun_link);
list_add_tail(&new->lun_link, &lun->lun_deve_list);
- spin_unlock_bh(&lun->lun_deve_lock);
+ spin_unlock(&lun->lun_deve_lock);
kref_put(&orig->pr_kref, target_pr_kref_release);
wait_for_completion(&orig->pr_comp);
@@ -369,9 +369,9 @@ int core_enable_device_list_for_node(
hlist_add_head_rcu(&new->link, &nacl->lun_entry_hlist);
mutex_unlock(&nacl->lun_entry_mutex);
- spin_lock_bh(&lun->lun_deve_lock);
+ spin_lock(&lun->lun_deve_lock);
list_add_tail(&new->lun_link, &lun->lun_deve_list);
- spin_unlock_bh(&lun->lun_deve_lock);
+ spin_unlock(&lun->lun_deve_lock);
return 0;
}
@@ -403,9 +403,9 @@ void core_disable_device_list_for_node(
* NodeACL context specific PR metadata for demo-mode
* MappedLUN *deve will be released below..
*/
- spin_lock_bh(&lun->lun_deve_lock);
+ spin_lock(&lun->lun_deve_lock);
list_del(&orig->lun_link);
- spin_unlock_bh(&lun->lun_deve_lock);
+ spin_unlock(&lun->lun_deve_lock);
/*
* Disable struct se_dev_entry LUN ACL mapping
*/