RDMA/core: Refactor rdma_bind_addr
authorPatrisious Haddad <phaddad@nvidia.com>
Wed, 4 Jan 2023 08:01:38 +0000 (10:01 +0200)
committerLeon Romanovsky <leon@kernel.org>
Tue, 10 Jan 2023 08:11:27 +0000 (10:11 +0200)
commit8d037973d48c026224ab285e6a06985ccac6f7bf
tree61cb03f35df23b9dba82d5f9833e76dd0104cf89
parent1d91855304c2046115ee10be2c93161d93d5d40d
RDMA/core: Refactor rdma_bind_addr

Refactor rdma_bind_addr function so that it doesn't require that the
cma destination address be changed before calling it.

So now it will update the destination address internally only when it is
really needed and after passing all the required checks.

Which in turn results in a cleaner and more sensible call and error
handling flows for the functions that call it directly or indirectly.

Signed-off-by: Patrisious Haddad <phaddad@nvidia.com>
Reported-by: Wei Chen <harperchen1110@gmail.com>
Reviewed-by: Mark Zhang <markzhang@nvidia.com>
Link: https://lore.kernel.org/r/3d0e9a2fd62bc10ba02fed1c7c48a48638952320.1672819273.git.leonro@nvidia.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/core/cma.c