]> git.baikalelectronics.ru Git - kernel.git/commit
RDS/IB: destroy connections on rmmod
authorZach Brown <zach.brown@oracle.com>
Fri, 25 Jun 2010 21:58:16 +0000 (14:58 -0700)
committerAndy Grover <andy.grover@oracle.com>
Thu, 9 Sep 2010 01:16:33 +0000 (18:16 -0700)
commit4df8ee452014fae2dcb6ef6acc26174ed10b324e
treebc9a78da5281b371d3a9ecb2e00f7c381d9cd33b
parent1b249f3dde0f67777eb1818795cbd39966c197c5
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 <zach.brown@oracle.com>
net/rds/ib.c
net/rds/ib.h
net/rds/ib_rdma.c