IB: When attrs.udata/ufile is available use that instead of uobject

The ucontext and ufile should not be accessed via the uobject, all these
cases have an attrs so use that instead.

Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
This commit is contained in:
Jason Gunthorpe
2019-04-01 17:08:24 -03:00
parent e79c9c6062
commit feec576a6a
6 changed files with 9 additions and 9 deletions

View File

@@ -128,7 +128,7 @@ __uobj_alloc(const struct uverbs_api_object *obj,
rdma_alloc_begin_uobject(obj, attrs->ufile, attrs);
if (!IS_ERR(uobj))
*ib_dev = uobj->context->device;
*ib_dev = attrs->context->device;
return uobj;
}