On Sun, Oct 07, 2018 at 10:23:07AM +0300, Shamir Rabinovitch wrote: > This function can replace the need for tests based on 'pd->uobject' > in the IB core code and will be used in next patches. > > Signed-off-by: Shamir Rabinovitch <shamir.rabinovitch@xxxxxxxxxx> > include/rdma/ib_verbs.h | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h > index 9897d2329f2c..136f2ffc4b0b 100644 > +++ b/include/rdma/ib_verbs.h > @@ -1550,6 +1550,11 @@ struct ib_pd { > struct rdma_restrack_entry res; > }; > > +static inline bool rdma_is_user_pd(struct ib_pd *pd) > +{ > + return !rdma_is_kernel_res(&pd->res); > +} Shouldn't this just be pd->res.user? Why are are we using two different ways to track user or not? Jason