Re: [PATCH V3 6/6] SCSI: don't hold device refcount in IO path

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

 



On Wed, Apr 03, 2019 at 09:24:54AM -0700, Bart Van Assche wrote:
> On Wed, 2019-04-03 at 18:26 +0800, Ming Lei wrote:
> >         /*
> > -        * Before a SCSI command is dispatched,
> > -        * get_device(&sdev->sdev_gendev) is called and the host,
> > -        * target and device busy counters are increased. Since
> > -        * requeuing a request causes these actions to be repeated and
> > -        * since scsi_device_unbusy() has already been called,
> > -        * put_device(&device->sdev_gendev) must still be called. Call
> > -        * put_device() after blk_mq_requeue_request() to avoid that
> > -        * removal of the SCSI device can start before requeueing has
> > -        * happened.
> > +        * Before a SCSI command is dispatched, the host, target and
> > +        * device busy counters are increased. Since requeuing a request
> > +        * causes these actions to be repeated and since scsi_device_unbusy()
> > +        * has already been called.
> >          */
> 
> The last sentence of the new comment looks incomplete to me ("Since ...").

Given most of the previous comment is about get/put device, I'd suggest
to remove the whole block given we are clean that get/put device isn't
required in IO path.

Will do that in V4 if no objections.

Thanks,
Ming



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux