]> git.baikalelectronics.ru Git - kernel.git/commit
net/smc: introduce bookkeeping of SMCR link groups
authorUrsula Braun <ubraun@linux.ibm.com>
Sat, 16 Nov 2019 16:47:29 +0000 (17:47 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sat, 16 Nov 2019 20:26:49 +0000 (12:26 -0800)
commitf3b37414c260cefeee775c6fb9119f303a8e7163
tree3e8be6a1af9a9a5e4389c7dda5c9ca06cc4ea06b
parent3033b22ad0b9cbef502bddad8ccfb513dd4dc5d2
net/smc: introduce bookkeeping of SMCR link groups

If the smc module is unloaded return control from exit routine only,
if all link groups are freed.
If an IB device is thrown away return control from device removal only,
if all link groups belonging to this device are freed.
Counters for the total number of SMCR link groups and for the total
number of SMCR links per IB device are introduced. smc module unloading
continues only if the total number of SMCR link groups is zero. IB device
removal continues only it the total number of SMCR links per IB device
has decreased to zero.

Signed-off-by: Ursula Braun <ubraun@linux.ibm.com>
Signed-off-by: Karsten Graul <kgraul@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/smc/af_smc.c
net/smc/smc_core.c
net/smc/smc_core.h
net/smc/smc_ib.c
net/smc/smc_ib.h