From 1adff1b3a7f75a1c255b7fcab5676edf29d4a5d8 Mon Sep 17 00:00:00 2001 From: Nicholas Bellinger Date: Mon, 22 Jun 2015 23:44:05 -0700 Subject: 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 Cc: Hannes Reinecke Signed-off-by: Nicholas Bellinger --- drivers/target/target_core_device.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'drivers/target/target_core_device.c') 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 */ -- cgit v1.2.3