RDMA/cma: Use a helper function to enqueue resolve work items
authorParav Pandit <parav@mellanox.com>
Sun, 26 Jan 2020 14:26:47 +0000 (16:26 +0200)
committerJason Gunthorpe <jgg@mellanox.com>
Tue, 11 Feb 2020 17:55:13 +0000 (13:55 -0400)
commit081ea5195a11c9f1eaa8393be603b75982f91b7d
treeb2f4e81453787adc0c9894dfb288bd01c6320f23
parentbb6d3fb354c5ee8d6bde2d576eb7220ea09862b9
RDMA/cma: Use a helper function to enqueue resolve work items

To avoid errors, with attaching ownership of work item and its cm_id
refcount which is decremented in work handler, tie them up in single
helper function. Also avoid code duplication.

Link: https://lore.kernel.org/r/20200126142652.104803-3-leon@kernel.org
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/cma.c