aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/target
diff options
context:
space:
mode:
authorNicholas Bellinger <nab@linux-iscsi.org>2014-06-03 21:28:25 -0400
committerNicholas Bellinger <nab@linux-iscsi.org>2014-06-05 22:44:40 -0400
commit5256ffdbdc1cb7e5ea69727698079c6f31b59a4f (patch)
tree18c0e4a09fbe526b57ee8cb94529240b714c4726 /drivers/target
parent3160723c49605965628c3ee7699e5e956c4f8f51 (diff)
iscsi-target: Remove no-op from iscsit_tpg_del_portal_group
This patch removes a no-op iscsit_clear_tpg_np_login_threads() call in iscsit_tpg_del_portal_group(), which is unnecessary because iscsit_tpg_del_portal_group() can only ever be removed from configfs once all of the child network portals have been released. Also, go ahed and make iscsit_clear_tpg_np_login_threads() declared as static. Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target')
-rw-r--r--drivers/target/iscsi/iscsi_target_tpg.c4
-rw-r--r--drivers/target/iscsi/iscsi_target_tpg.h1
2 files changed, 1 insertions, 4 deletions
diff --git a/drivers/target/iscsi/iscsi_target_tpg.c b/drivers/target/iscsi/iscsi_target_tpg.c
index ca1811858afd..71126761af5f 100644
--- a/drivers/target/iscsi/iscsi_target_tpg.c
+++ b/drivers/target/iscsi/iscsi_target_tpg.c
@@ -188,7 +188,7 @@ static void iscsit_clear_tpg_np_login_thread(
188 iscsit_reset_np_thread(tpg_np->tpg_np, tpg_np, tpg, shutdown); 188 iscsit_reset_np_thread(tpg_np->tpg_np, tpg_np, tpg, shutdown);
189} 189}
190 190
191void iscsit_clear_tpg_np_login_threads( 191static void iscsit_clear_tpg_np_login_threads(
192 struct iscsi_portal_group *tpg, 192 struct iscsi_portal_group *tpg,
193 bool shutdown) 193 bool shutdown)
194{ 194{
@@ -275,8 +275,6 @@ int iscsit_tpg_del_portal_group(
275 tpg->tpg_state = TPG_STATE_INACTIVE; 275 tpg->tpg_state = TPG_STATE_INACTIVE;
276 spin_unlock(&tpg->tpg_state_lock); 276 spin_unlock(&tpg->tpg_state_lock);
277 277
278 iscsit_clear_tpg_np_login_threads(tpg, true);
279
280 if (iscsit_release_sessions_for_tpg(tpg, force) < 0) { 278 if (iscsit_release_sessions_for_tpg(tpg, force) < 0) {
281 pr_err("Unable to delete iSCSI Target Portal Group:" 279 pr_err("Unable to delete iSCSI Target Portal Group:"
282 " %hu while active sessions exist, and force=0\n", 280 " %hu while active sessions exist, and force=0\n",
diff --git a/drivers/target/iscsi/iscsi_target_tpg.h b/drivers/target/iscsi/iscsi_target_tpg.h
index 0a182f2aa8a2..e7265337bc43 100644
--- a/drivers/target/iscsi/iscsi_target_tpg.h
+++ b/drivers/target/iscsi/iscsi_target_tpg.h
@@ -8,7 +8,6 @@ extern struct iscsi_portal_group *iscsit_get_tpg_from_np(struct iscsi_tiqn *,
8 struct iscsi_np *, struct iscsi_tpg_np **); 8 struct iscsi_np *, struct iscsi_tpg_np **);
9extern int iscsit_get_tpg(struct iscsi_portal_group *); 9extern int iscsit_get_tpg(struct iscsi_portal_group *);
10extern void iscsit_put_tpg(struct iscsi_portal_group *); 10extern void iscsit_put_tpg(struct iscsi_portal_group *);
11extern void iscsit_clear_tpg_np_login_threads(struct iscsi_portal_group *, bool);
12extern void iscsit_tpg_dump_params(struct iscsi_portal_group *); 11extern void iscsit_tpg_dump_params(struct iscsi_portal_group *);
13extern int iscsit_tpg_add_portal_group(struct iscsi_tiqn *, struct iscsi_portal_group *); 12extern int iscsit_tpg_add_portal_group(struct iscsi_tiqn *, struct iscsi_portal_group *);
14extern int iscsit_tpg_del_portal_group(struct iscsi_tiqn *, struct iscsi_portal_group *, 13extern int iscsit_tpg_del_portal_group(struct iscsi_tiqn *, struct iscsi_portal_group *,