From 8aeb1ba6630ffd44001ae9833842794df0107676 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Fri, 25 Jun 2010 14:58:16 -0700 Subject: RDS/IB: destroy connections on rmmod IB connections were not being destroyed during rmmod. First, recently IB device removal callback was changed to disconnect connections that used the removing device rather than destroying them. So connections with devices during rmmod were not being destroyed. Second, rds_ib_destroy_nodev_conns() was being called before connections are disassociated with devices. It would almost never find connections in the nodev list. We first get rid of rds_ib_destroy_conns(), which is no longer called, and refactor the existing caller into the main body of the function and get rid of the list and lock wrappers. Then we call rds_ib_destroy_nodev_conns() *after* ib_unregister_client() has removed the IB device from all the conns and put the conns on the nodev list. The result is that IB connections are destroyed by rmmod. Signed-off-by: Zach Brown --- net/rds/ib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'net/rds/ib.c') diff --git a/net/rds/ib.c b/net/rds/ib.c index fc14f637d645..af1ef18b6ff0 100644 --- a/net/rds/ib.c +++ b/net/rds/ib.c @@ -346,8 +346,8 @@ static void rds_ib_unregister_client(void) void rds_ib_exit(void) { rds_info_deregister_func(RDS_INFO_IB_CONNECTIONS, rds_ib_ic_info); - rds_ib_destroy_nodev_conns(); rds_ib_unregister_client(); + rds_ib_destroy_nodev_conns(); rds_ib_sysctl_exit(); rds_ib_recv_exit(); rds_trans_unregister(&rds_ib_transport); -- cgit v1.2.3