OSDN Git Service

IB/mlx5: Flow through a more detailed return code from get_prefetchable_mr()
authorJason Gunthorpe <jgg@nvidia.com>
Fri, 3 Sep 2021 08:48:15 +0000 (16:48 +0800)
committerJason Gunthorpe <jgg@nvidia.com>
Fri, 1 Oct 2021 14:40:07 +0000 (11:40 -0300)
commit49b99314b49ef95b5a6f3bd9f0fc8912cfd10a9f
tree6f65f86dcbda6c770559520972581b2af9e8a81b
parentd30ef6d5c013c19e907f2a3a3d6eee04fcd3de0d
IB/mlx5: Flow through a more detailed return code from get_prefetchable_mr()

The error returns for various cases detected by get_prefetchable_mr() get
confused as it flows back to userspace. Properly label each error path and
flow the error code properly back to the system call.

Link: https://lore.kernel.org/r/20210928170846.GA1721590@nvidia.com
Suggested-by: Li Zhijian <lizhijian@cn.fujitsu.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/hw/mlx5/odp.c