sd: call sd_zbc_release_disk before releasing the scsi_device reference
authorChristoph Hellwig <hch@lst.de>
Tue, 8 Mar 2022 05:51:51 +0000 (06:51 +0100)
committerJens Axboe <axboe@kernel.dk>
Wed, 9 Mar 2022 02:40:01 +0000 (19:40 -0700)
commitc76c46fa04c42f7d3a494c526ce5f030da36b553
tree581a1de75343f946597745952fec4ad8c18c09d9
parentfad45c3007a18064da759b4dba35eb722bc64e97
sd: call sd_zbc_release_disk before releasing the scsi_device reference

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: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Link: https://lore.kernel.org/r/20220308055200.735835-6-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/scsi/sd.c