RDMA/{cma, core}: Avoid callback on rdma_addr_cancel()
authorParav Pandit <parav@mellanox.com>
Tue, 28 Aug 2018 11:45:32 +0000 (14:45 +0300)
committerJason Gunthorpe <jgg@mellanox.com>
Thu, 6 Sep 2018 19:35:16 +0000 (13:35 -0600)
commit722c7b2bfeadbae8d9aaa08552c456e09d17a7f7
tree5358c1e33da4d484588fe2ab0de7b1cc65f930e7
parentf9d08f1e1939ad4d92e38bd3dee6842512f5bee6
RDMA/{cma, core}: Avoid callback on rdma_addr_cancel()

Currently rdma_addr_cancel() is an async operation, which notifies that
cancel is done by executing the callback function given during
rdma_resolve_ip(). If resolve_ip request is already completed than
callback is not executed.

Instead, now rdma_resolve_addr() and rdma_addr_cancel() simplified in
following ways.
1. rdma_addr_cancel() now a synchronous method. If request was
pending, after it is cancelled, no callback is notified.
2. rdma_resolve_addr() and respective addr_handler() callback doesn't
need to hold reference to cm_id.

Signed-off-by: Parav Pandit <parav@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/core/addr.c
drivers/infiniband/core/cma.c