From patchwork Fri Mar 27 08:05:07 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Nicholas A. Bellinger" X-Patchwork-Id: 6104051 Return-Path: X-Original-To: patchwork-linux-scsi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 296009F399 for ; Fri, 27 Mar 2015 08:07:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2AA40203E5 for ; Fri, 27 Mar 2015 08:07:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 04BC0203F7 for ; Fri, 27 Mar 2015 08:07:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753697AbbC0IHA (ORCPT ); Fri, 27 Mar 2015 04:07:00 -0400 Received: from mail-oi0-f43.google.com ([209.85.218.43]:33837 "EHLO mail-oi0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753625AbbC0IG2 (ORCPT ); Fri, 27 Mar 2015 04:06:28 -0400 Received: by oigz129 with SMTP id z129so25143640oig.1 for ; Fri, 27 Mar 2015 01:06:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=HlFuKPAsFgw73FQnE8d7SeBKbAkxlz2VuSQZpX2BfQM=; b=aK/ctj88EaIQ9LqwG98IweHtwtSJMdQbZW02yerVOWpamj/fwPbua+vaE+bc1PvdVC Ku2hvBnzYz/Oqn+L1a4O3b4uTxP9v4JU/iI98DddW2I4EPJ0AT76Q3adKc4oozW+/tKg 6MAZ3V0BVbUP2vBWmEukXaYW8SHyoY3aTHQfo8Mi5jTK59pQ7StEG9Gb/D7jzNcBduHn Klt9olKNdVJBCuJQsnXlX+V1LwLizSXXnxxoz10CpLfIEse7uOeJWkrpHjoXE/KXAA5X t/JpCXepLD5xooYOZGzoUJSUi14jypUqDdD1Q7KTZhmSN8BpcUiYDJDgwVS7kR/GtFaT k81A== X-Gm-Message-State: ALoCoQk01SDCPVaK0Kc1P18hiKXU8uv7pbi3kkq5EMcQ+ZWiHLYsP0KJegqb/96EfwUfrEKKbVuD X-Received: by 10.182.55.68 with SMTP id q4mr2758518obp.33.1427443587562; Fri, 27 Mar 2015 01:06:27 -0700 (PDT) Received: from localhost.localdomain (mail.linux-iscsi.org. [67.23.28.174]) by mx.google.com with ESMTPSA id h4sm711520obr.18.2015.03.27.01.06.27 (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 27 Mar 2015 01:06:27 -0700 (PDT) From: "Nicholas A. Bellinger" To: target-devel Cc: linux-scsi , Hannes Reinecke , Christoph Hellwig , Sagi Grimberg , Nicholas Bellinger Subject: [RFC 17/22] target: Drop core_tpg_clear_object_luns Date: Fri, 27 Mar 2015 08:05:07 +0000 Message-Id: <1427443512-8925-18-git-send-email-nab@daterainc.com> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1427443512-8925-1-git-send-email-nab@daterainc.com> References: <1427443512-8925-1-git-send-email-nab@daterainc.com> Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Nicholas Bellinger Signed-off-by: Nicholas Bellinger --- drivers/target/iscsi/iscsi_target_tpg.c | 2 -- drivers/target/target_core_tpg.c | 21 --------------------- include/target/target_core_fabric.h | 1 - 3 files changed, 24 deletions(-) diff --git a/drivers/target/iscsi/iscsi_target_tpg.c b/drivers/target/iscsi/iscsi_target_tpg.c index bdd127c..2261c8c 100644 --- a/drivers/target/iscsi/iscsi_target_tpg.c +++ b/drivers/target/iscsi/iscsi_target_tpg.c @@ -284,8 +284,6 @@ int iscsit_tpg_del_portal_group( return -EPERM; } - core_tpg_clear_object_luns(&tpg->tpg_se_tpg); - if (tpg->param_list) { iscsi_release_param_list(tpg->param_list); tpg->param_list = NULL; diff --git a/drivers/target/target_core_tpg.c b/drivers/target/target_core_tpg.c index a1849ce..f197618 100644 --- a/drivers/target/target_core_tpg.c +++ b/drivers/target/target_core_tpg.c @@ -325,27 +325,6 @@ void core_tpg_wait_for_nacl_pr_ref(struct se_node_acl *nacl) cpu_relax(); } -void core_tpg_clear_object_luns(struct se_portal_group *tpg) -{ - int i; - struct se_lun *lun; - - mutex_lock(&tpg->tpg_lun_mutex); - for (i = 0; i < TRANSPORT_MAX_LUNS_PER_TPG; i++) { - lun = tpg->tpg_lun_list[i]; - - if ((lun->lun_status != TRANSPORT_LUN_STATUS_ACTIVE) || - (lun->lun_se_dev == NULL)) - continue; - - mutex_unlock(&tpg->tpg_lun_mutex); - core_dev_del_lun(tpg, lun); - mutex_lock(&tpg->tpg_lun_mutex); - } - mutex_unlock(&tpg->tpg_lun_mutex); -} -EXPORT_SYMBOL(core_tpg_clear_object_luns); - /* core_tpg_add_initiator_node_acl(): * * diff --git a/include/target/target_core_fabric.h b/include/target/target_core_fabric.h index 9811c85..578fc93 100644 --- a/include/target/target_core_fabric.h +++ b/include/target/target_core_fabric.h @@ -152,7 +152,6 @@ struct se_node_acl *core_tpg_get_initiator_node_acl(struct se_portal_group *tpg, unsigned char *); struct se_node_acl *core_tpg_check_initiator_node_acl(struct se_portal_group *, unsigned char *); -void core_tpg_clear_object_luns(struct se_portal_group *); struct se_node_acl *core_tpg_add_initiator_node_acl(struct se_portal_group *, struct se_node_acl *, const char *, u32); int core_tpg_del_initiator_node_acl(struct se_portal_group *,