RDMA/rxe: Return errors for add index and key
authorBob Pearson <rpearsonhpe@gmail.com>
Tue, 8 Jun 2021 04:25:45 +0000 (23:25 -0500)
committerJason Gunthorpe <jgg@nvidia.com>
Wed, 16 Jun 2021 23:51:17 +0000 (20:51 -0300)
commit08224016abde5ddca25bb976a66c974b2e2bdbed
tree222b045969cccc66f1a014b871573726fa3ffd2a
parent660a59369e1ed96dd0ff1d9d73bad5b48aa50884
RDMA/rxe: Return errors for add index and key

Modify rxe_add_index() and rxe_add_key() to return an error if the index
or key is aleady present in the pool.  Currently they print a warning and
silently fail with bad consequences to the caller.

Link: https://lore.kernel.org/r/20210608042552.33275-3-rpearsonhpe@gmail.com
Signed-off-by: Bob Pearson <rpearsonhpe@gmail.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/sw/rxe/rxe_pool.c
drivers/infiniband/sw/rxe/rxe_pool.h