Re: [PATCH v2] scsi: add non-sleeping variant of scsi_device_put() and use it in alua

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

 



On Tue, 2023-01-24 at 07:23 -0800, Bart Van Assche wrote:
> On 1/24/23 06:30, mwilck@xxxxxxxx wrote:
> > +/**
> > + * scsi_device_put_nosleep  -  release a reference to a
> > scsi_device
> > + * @sdev:      device to release a reference on.
> > + *
> > + * Description: Release a reference to the scsi_device and
> > decrements the use
> > + * count of the underlying LLDD module. This function may only be
> > called from
> > + * a call context where it is certain that the reference dropped
> > is not the
> > + * last one.
> > + */
> 
> The above comment does not cover the call from scsi_device_put().
> That 
> could be addressed by adding the following text at the end of the
> above 
> comment: " or from a context in which it is allowed to sleep".
> However, 
> if that text would be added the function name 
> ("scsi_device_put_nosleep()") would become confusing. How about 
> open-coding scsi_device_put_nosleep() in scsi_device_put() to prevent
> this confusion?

Or simply mentioning that the call from scsi_device_put() is legal?

Martin





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux