]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commita868a1254008ef447bfc5fb259569cd0aab7bef1
tree26c616070d01bad16878cbfebfa34e9cc75bded2
parentd87ef709ab5e8aab7834dfd7fc3386728f172d3e
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