[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8956ccbb-f45e-692c-5208-ec52a3062680@os.inf.tu-dresden.de>
Date: Mon, 22 Jul 2019 17:31:20 +0200
From: Maksym Planeta <mplaneta@...inf.tu-dresden.de>
To: Jason Gunthorpe <jgg@...pe.ca>
Cc: Moni Shoua <monis@...lanox.com>,
Doug Ledford <dledford@...hat.com>, linux-rdma@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 07/10] Pass the return value of kref_put further
In a later patch I need to know if the dependency to QP object still
exists or not.
On 22/07/2019 17:29, Jason Gunthorpe wrote:
> On Mon, Jul 22, 2019 at 05:14:23PM +0200, Maksym Planeta wrote:
>> Used in a later patch.
>>
>> Signed-off-by: Maksym Planeta <mplaneta@...inf.tu-dresden.de>
>> drivers/infiniband/sw/rxe/rxe_pool.c | 3 ++-
>> drivers/infiniband/sw/rxe/rxe_pool.h | 2 +-
>> 2 files changed, 3 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/infiniband/sw/rxe/rxe_pool.c b/drivers/infiniband/sw/rxe/rxe_pool.c
>> index 30a887cf9200..711d7d7f3692 100644
>> +++ b/drivers/infiniband/sw/rxe/rxe_pool.c
>> @@ -541,7 +541,7 @@ static void rxe_dummy_release(struct kref *kref)
>> {
>> }
>>
>> -void rxe_drop_ref(struct rxe_pool_entry *pelem)
>> +int rxe_drop_ref(struct rxe_pool_entry *pelem)
>> {
>> int res;
>> struct rxe_pool *pool = pelem->pool;
>> @@ -553,4 +553,5 @@ void rxe_drop_ref(struct rxe_pool_entry *pelem)
>> if (res) {
>> rxe_elem_release(&pelem->ref_cnt);
>> }
>> + return res;
>> }
>
> Using the return value of kref_put at all is super sketchy. Are you
> sure this is actually a kref usage pattern?
>
> Why would this be needed?
>
> Jason
>
--
Regards,
Maksym Planeta
Powered by blists - more mailing lists