diff options
author | Andy Grover <agrover@redhat.com> | 2012-07-12 16:09:03 -0700 |
---|---|---|
committer | Andy Grover <agrover@redhat.com> | 2012-07-12 17:28:05 -0700 |
commit | 88379c661b04e28879df5503a991434392064f5d (patch) | |
tree | 437b1464b64e760182f23ecbb1d41149c458e4b8 /drivers/target/target_core_tpg.c | |
parent | 78d6123f24f30acdca598099bb279143e1716a9d (diff) | |
download | linux-88379c661b04e28879df5503a991434392064f5d.tar.gz linux-88379c661b04e28879df5503a991434392064f5d.tar.xz linux-88379c661b04e28879df5503a991434392064f5d.zip |
target: refactor core_update_device_list_for_node()for-nab
Code was almost entirely divided based on value of bool param "enable".
Split it into two functions.
Signed-off-by: Andy Grover <agrover@redhat.com>
Diffstat (limited to 'drivers/target/target_core_tpg.c')
-rw-r--r-- | drivers/target/target_core_tpg.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/target/target_core_tpg.c b/drivers/target/target_core_tpg.c index 5ca340cff111..b8628a5014b9 100644 --- a/drivers/target/target_core_tpg.c +++ b/drivers/target/target_core_tpg.c @@ -77,8 +77,8 @@ static void core_clear_initiator_node_from_tpg( lun = deve->se_lun; spin_unlock_irq(&nacl->device_list_lock); - core_update_device_list_for_node(lun, NULL, deve->mapped_lun, - TRANSPORT_LUNFLAGS_NO_ACCESS, nacl, tpg, 0); + core_disable_device_list_for_node(lun, NULL, deve->mapped_lun, + TRANSPORT_LUNFLAGS_NO_ACCESS, nacl, tpg); spin_lock_irq(&nacl->device_list_lock); } @@ -172,8 +172,8 @@ void core_tpg_add_node_to_devs( (lun_access == TRANSPORT_LUNFLAGS_READ_WRITE) ? "READ-WRITE" : "READ-ONLY"); - core_update_device_list_for_node(lun, NULL, lun->unpacked_lun, - lun_access, acl, tpg, 1); + core_enable_device_list_for_node(lun, NULL, lun->unpacked_lun, + lun_access, acl, tpg); spin_lock(&tpg->tpg_lun_lock); } spin_unlock(&tpg->tpg_lun_lock); |