diff options
author | Yishai Hadas <yishaih@mellanox.com> | 2018-11-26 09:28:33 +0300 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2018-12-04 21:46:41 +0300 |
commit | 4d7e8cc57429e1874658acbff98d3877c81cd0a4 (patch) | |
tree | c6052f9ab683b76929a5a9dc17287d2692585e89 /drivers/infiniband/core/uverbs_uapi.c | |
parent | f33cb7e760dee94dd2b2d7a7f6225578a66a17d5 (diff) | |
download | linux-4d7e8cc57429e1874658acbff98d3877c81cd0a4.tar.xz |
IB/core: Introduce UVERBS_IDR_ANY_OBJECT
Introduce the UVERBS_IDR_ANY_OBJECT type to match any IDR object.
Once used, the infrastructure skips checking for the IDR type, it
becomes the driver handler responsibility.
This enables drivers to get in a given method an object from various of
types.
Signed-off-by: Yishai Hadas <yishaih@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/core/uverbs_uapi.c')
-rw-r--r-- | drivers/infiniband/core/uverbs_uapi.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/infiniband/core/uverbs_uapi.c b/drivers/infiniband/core/uverbs_uapi.c index 19ae4b19b2ef..faac225184a6 100644 --- a/drivers/infiniband/core/uverbs_uapi.c +++ b/drivers/infiniband/core/uverbs_uapi.c @@ -580,8 +580,13 @@ again: if (obj_key == UVERBS_API_KEY_ERR) continue; tmp_obj = uapi_get_object(uapi, obj_key); - if (tmp_obj && !tmp_obj->disabled) - continue; + if (IS_ERR(tmp_obj)) { + if (PTR_ERR(tmp_obj) == -ENOMSG) + continue; + } else { + if (!tmp_obj->disabled) + continue; + } starting_key = iter.index; uapi_remove_method( |