[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190630004048.GB7173@mellanox.com>
Date: Sun, 30 Jun 2019 00:40:54 +0000
From: Jason Gunthorpe <jgg@...lanox.com>
To: Leon Romanovsky <leon@...nel.org>
CC: Doug Ledford <dledford@...hat.com>,
Leon Romanovsky <leonro@...lanox.com>,
RDMA mailing list <linux-rdma@...r.kernel.org>,
Majd Dibbiny <majd@...lanox.com>,
Mark Zhang <markz@...lanox.com>,
Saeed Mahameed <saeedm@...lanox.com>,
linux-netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH rdma-next v4 06/17] RDMA/counter: Add "auto" configuration
mode support
On Tue, Jun 18, 2019 at 08:26:14PM +0300, Leon Romanovsky wrote:
> +static void __rdma_counter_dealloc(struct rdma_counter *counter)
> +{
> + mutex_lock(&counter->lock);
> + counter->device->ops.counter_dealloc(counter);
> + mutex_unlock(&counter->lock);
> +}
Does this lock do anything? The kref is 0 at this point, so no other
thread can have a pointer to this lock.
> +
> +static void rdma_counter_dealloc(struct rdma_counter *counter)
> +{
> + if (!counter)
> + return;
Counter is never NULL.
Jason
Powered by blists - more mailing lists