RDS: TCP: Remove dead logic around c_passive in rds-tcp
authorSowmini Varadhan <sowmini.varadhan@oracle.com>
Thu, 30 Jun 2016 23:11:11 +0000 (16:11 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 1 Jul 2016 20:45:17 +0000 (16:45 -0400)
The c_passive bit is only intended for the IB transport and will
never be encountered in rds-tcp, so remove the dead logic that
predicates on this bit.

Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/rds/tcp.c

index b139630daaa4eaa1196f9e7aa4959ab4b94e771a..c56fff28084fc2f208d2e9050994905d80c2ac86 100644 (file)
@@ -329,11 +329,8 @@ static void rds_tcp_destroy_conns(void)
        INIT_LIST_HEAD(&rds_tcp_conn_list);
        spin_unlock_irq(&rds_tcp_conn_lock);
 
-       list_for_each_entry_safe(tc, _tc, &tmp_list, t_tcp_node) {
-               if (tc->conn->c_passive)
-                       rds_conn_destroy(tc->conn->c_passive);
+       list_for_each_entry_safe(tc, _tc, &tmp_list, t_tcp_node)
                rds_conn_destroy(tc->conn);
-       }
 }
 
 static void rds_tcp_exit(void);
@@ -512,8 +509,6 @@ static void rds_tcp_kill_sock(struct net *net)
                sk = tc->t_sock->sk;
                sk->sk_prot->disconnect(sk, 0);
                tcp_done(sk);
-               if (tc->conn->c_passive)
-                       rds_conn_destroy(tc->conn->c_passive);
                rds_conn_destroy(tc->conn);
        }
 }