Message ID | 20220304160331.399757-6-hch@lst.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [01/14] blk-mq: do not include passthrough requests in I/O accounting | expand |
On 3/4/22 08:03, Christoph Hellwig wrote: > sd_zbc_release_disk accesses disk->device, so ensure that actually still has > a valid reference. Reviewed-by: Bart Van Assche <bvanassche@acm.org>
On Fri, Mar 04, 2022 at 05:03:22PM +0100, Christoph Hellwig wrote: > sd_zbc_release_disk accesses disk->device, so ensure that actually still has > a valid reference. > > Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Ming Lei <ming.lei@redhat.com>
Christoph, > sd_zbc_release_disk accesses disk->device, so ensure that actually > still has a valid reference. Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 7479e7cb36b43..7bfebf5b2832d 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -3672,9 +3672,9 @@ static void scsi_disk_release(struct device *dev) disk->private_data = NULL; put_disk(disk); - put_device(&sdkp->device->sdev_gendev); sd_zbc_release_disk(sdkp); + put_device(&sdkp->device->sdev_gendev); kfree(sdkp); }
sd_zbc_release_disk accesses disk->device, so ensure that actually still has a valid reference. Signed-off-by: Christoph Hellwig <hch@lst.de> --- drivers/scsi/sd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)