diff options
author | Andy Grover | 2012-07-13 02:34:58 +0200 |
---|---|---|
committer | Nicholas Bellinger | 2012-07-17 02:35:24 +0200 |
commit | e80ac6c4cc073d54daef8ba4ced88347d130d314 (patch) | |
tree | dfa41df2e34fc759e3b9c1b47efec0fdc73799c3 /drivers/target/target_core_tpg.c | |
parent | target: Eliminate else using boolean logic (diff) | |
download | kernel-qcow2-linux-e80ac6c4cc073d54daef8ba4ced88347d130d314.tar.gz kernel-qcow2-linux-e80ac6c4cc073d54daef8ba4ced88347d130d314.tar.xz kernel-qcow2-linux-e80ac6c4cc073d54daef8ba4ced88347d130d314.zip |
target: refactor core_update_device_list_for_node()
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>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
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); |