Re: [PATCH 21/21] kref: Remove kref_put_spinlock_irqsave()

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

 



On Fri, Oct 23, 2015 at 07:47:29AM +0200, Christoph Hellwig wrote:
> On Thu, Oct 22, 2015 at 05:29:36PM -0700, Greg Kroah-Hartman wrote:
> > On Thu, Oct 22, 2015 at 04:02:14PM -0700, Bart Van Assche wrote:
> > > The last user is gone. Hence remove this function.
> > 
> > No, please don't do that, someone else will come along that will need it
> > someday, and it isn't hurting anything to keep it here.
> 
> It bloats the kernel,

It's a .h file, no size bloat :)

> and users should much better use kref_get_unless_zero
> which is easier to understand and has much better defined semantics.

But that requires people to check the result, which isn't needed for the
other call, so it's just a matter of "taste" I guess.  Both work the
same.

But I do agree that kref_put_spinlock_irqsave is hard to understand,
it's a non-trivial piece of code...

> > Odds are, some in-kernel code should be converted to be using it to fix
> > race conditions anyway...
> 
> Please not.  Use kref_get_unless_zero and get rid of this thing before
> it grows another user.  Consistency is good.

Ok, if the target code drops this, I guess it's fine, we can easily add
it back if someone else wants it in the future, so:

Acked-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux