net/smc: improved fix wait on already cleared link
authorKarsten Graul <kgraul@linux.ibm.com>
Thu, 7 Oct 2021 14:14:40 +0000 (16:14 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 5 Jan 2022 11:40:31 +0000 (12:40 +0100)
commit99f19566b1c4d3dc4d934ee2ef43faadebb56d70
tree55d8b157101f71426d2897c6231dc0e3afe7ee43
parente553265ea56482da5700f56319fda9ff53e7dcb4
net/smc: improved fix wait on already cleared link

[ Upstream commit 95f7f3e7dc6bd2e735cb5de11734ea2222b1e05a ]

Commit 8f3d65c16679 ("net/smc: fix wait on already cleared link")
introduced link refcounting to avoid waits on already cleared links.
This patch extents and improves the refcounting to cover all
remaining possible cases for this kind of error situation.

Fixes: 15e1b99aadfb ("net/smc: no WR buffer wait for terminating link group")
Signed-off-by: Karsten Graul <kgraul@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/smc/smc_cdc.c
net/smc/smc_core.c
net/smc/smc_llc.c
net/smc/smc_tx.c
net/smc/smc_wr.h