RDMA/mlx5: Lift implicit_mr_alloc() into the two routines that call it
authorJason Gunthorpe <jgg@mellanox.com>
Wed, 9 Oct 2019 16:09:26 +0000 (13:09 -0300)
committerJason Gunthorpe <jgg@mellanox.com>
Mon, 28 Oct 2019 19:41:13 +0000 (16:41 -0300)
commitc2edcd69351f681594a30b17b7fbc5259a038fb0
tree27462e3178868fa46ea6379c3a5cad26f8d1d278
parent3d5f3c54e7bc82a279c80c18087462c0ce00ba44
RDMA/mlx5: Lift implicit_mr_alloc() into the two routines that call it

This makes the routines easier to understand, particularly with respect
the locking requirements of the entire sequence. The implicit_mr_alloc()
had a lot of ifs specializing it to each of the callers, and only a very
small amount of code was actually shared.

Following patches will cause the flow in the two functions to diverge
further.

Link: https://lore.kernel.org/r/20191009160934.3143-7-jgg@ziepe.ca
Reviewed-by: Artemy Kovalyov <artemyko@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/mlx5/odp.c