sr: use bdev_check_media_change
authorChristoph Hellwig <hch@lst.de>
Tue, 8 Sep 2020 14:53:45 +0000 (16:53 +0200)
committerJens Axboe <axboe@kernel.dk>
Thu, 10 Sep 2020 15:32:31 +0000 (09:32 -0600)
commitafd35c4f573d7eb1df9dbb7e0af0f4d93bd01f31
tree26c616070d01bad16878cbfebfa34e9cc75bded2
parent471bd0af544bcd80450d61659a1ffabdd1820d7d
sr: use bdev_check_media_change

Switch to use bdev_check_media_change instead of check_disk_change and
call sr_block_revalidate_disk manually.  Also add an explicit call to
sr_block_revalidate_disk just before disk_add() to ensure we always
read check for a ready unit and read the TOC and then stop wiring up
->revalidate_disk.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/scsi/sr.c