]> git.baikalelectronics.ru Git - kernel.git/commit
net/smc: consolidate unlocking in same function
authorKarsten Graul <kgraul@linux.ibm.com>
Wed, 7 Oct 2020 20:57:41 +0000 (22:57 +0200)
committerJakub Kicinski <kuba@kernel.org>
Sat, 10 Oct 2020 01:15:47 +0000 (18:15 -0700)
commit847d87d4251b901341ba0d4d9789fc97266e4115
tree5d3f219cb6d7fe04abba79d52677451f548e133f
parent18b70916b42f2e628b45e9663e2c01840c24d5bf
net/smc: consolidate unlocking in same function

Static code checkers warn of inconsistent returns because the lgr mutex
is locked in one function and unlocked in a function called by the
locking function:
net/smc/af_smc.c:823 smc_connect_rdma() warn: inconsistent returns 'smc_client_lgr_pending'.
net/smc/af_smc.c:897 smc_connect_ism() warn: inconsistent returns 'smc_server_lgr_pending'.

Make the code consistent by doing the unlock in the same function that
fetches the lock. No functional changes.

Signed-off-by: Karsten Graul <kgraul@linux.ibm.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/smc/af_smc.c