Re: [PATCH v2 2/8] nvmet-rdma: wrap raw kref_get/put() with corresponding helpers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jun 04, 2018 at 03:49:16PM -0600, Jason Gunthorpe wrote:
> > +{
> > +	return kref_put(&dev->ref, nvmet_rdma_free_device);
> > +}
> > +
> > +static int nvmet_rdma_dev_get(struct nvmet_rdma_device *dev)
> > +{
> > +	return kref_get_unless_zero(&dev->ref);
> > +}
> 
> Don't wrap get_unless_zero with something called get..

Agreed.  And I hate all these wrappers.  Either we use kref_*
or we use wrappers and plain refcount_* ops, not both.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux