target: Remove an unused variable
authorBart Van Assche <bart.vanassche@sandisk.com>
Tue, 5 Jan 2016 13:45:03 +0000 (14:45 +0100)
committerNicholas Bellinger <nab@linux-iscsi.org>
Thu, 7 Jan 2016 21:57:53 +0000 (13:57 -0800)
The num_node_acls member in struct se_portal_group is modified
by several functions but is never read. Hence remove it.

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Andy Grover <agrover@redhat.com>
Cc: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/target_core_tpg.c
drivers/target/target_core_transport.c
include/target/target_core_base.h

index 5fb9dd7f08bb030d6970f05a5600af41b37257a6..62103a8cbe72e406f5a9d54ce488743fd63356e8 100644 (file)
@@ -219,7 +219,6 @@ static void target_add_node_acl(struct se_node_acl *acl)
 
        mutex_lock(&tpg->acl_node_mutex);
        list_add_tail(&acl->acl_list, &tpg->acl_node_list);
-       tpg->num_node_acls++;
        mutex_unlock(&tpg->acl_node_mutex);
 
        pr_debug("%s_TPG[%hu] - Added %s ACL with TCQ Depth: %d for %s"
@@ -318,7 +317,6 @@ void core_tpg_del_initiator_node_acl(struct se_node_acl *acl)
                acl->dynamic_node_acl = 0;
        }
        list_del(&acl->acl_list);
-       tpg->num_node_acls--;
        mutex_unlock(&tpg->acl_node_mutex);
 
        spin_lock_irqsave(&acl->nacl_sess_lock, flags);
@@ -595,7 +593,6 @@ int core_tpg_deregister(struct se_portal_group *se_tpg)
         */
        list_for_each_entry_safe(nacl, nacl_tmp, &node_list, acl_list) {
                list_del(&nacl->acl_list);
-               se_tpg->num_node_acls--;
 
                core_tpg_wait_for_nacl_pr_ref(nacl);
                core_free_device_list_for_node(nacl, se_tpg);
index 717c73bbebecba4d045eba5a369471f0ee5d6883..c0e112c4de28ffce6a8fde3963b5e2d9caab29e0 100644 (file)
@@ -502,7 +502,6 @@ void transport_deregister_session(struct se_session *se_sess)
        if (se_nacl && se_nacl->dynamic_node_acl) {
                if (!se_tfo->tpg_check_demo_mode_cache(se_tpg)) {
                        list_del(&se_nacl->acl_list);
-                       se_tpg->num_node_acls--;
                        drop_nacl = true;
                }
        }
index 4b258fcc7d6fb7db1fa19cb39c956012343f6509..a4bed07f92a93b5845053ddda7be039b4d6e22b9 100644 (file)
@@ -868,8 +868,6 @@ struct se_portal_group {
         * Negative values can be used by fabric drivers for internal use TPGs.
         */
        int                     proto_id;
-       /* Number of ACLed Initiator Nodes for this TPG */
-       u32                     num_node_acls;
        /* Used for PR SPEC_I_PT=1 and REGISTER_AND_MOVE */
        atomic_t                tpg_pr_ref_count;
        /* Spinlock for adding/removing ACLed Nodes */