diff mbox series

[11/19] gdrom: use bdev_check_media_change

Message ID 20200902141218.212614-12-hch@lst.de (mailing list archive)
State New, archived
Headers show
Series [01/19] block: add a bdev_check_media_change helper | expand

Commit Message

Christoph Hellwig Sept. 2, 2020, 2:12 p.m. UTC
The GD-ROM driver does not have a ->revalidate_disk method, so it can
just use bdev_check_media_change without any additional changes.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 drivers/cdrom/gdrom.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Johannes Thumshirn Sept. 2, 2020, 3:44 p.m. UTC | #1
Looks good,
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
antlists Sept. 2, 2020, 10 p.m. UTC | #2
On 02/09/2020 15:12, Christoph Hellwig wrote:
> The GD-ROM driver does not have a ->revalidate_disk method, so it can
       ^^ (sic)

Cheers,
Wol
Christoph Hellwig Sept. 8, 2020, 2:23 p.m. UTC | #3
On Wed, Sep 02, 2020 at 11:00:05PM +0100, antlists wrote:
> On 02/09/2020 15:12, Christoph Hellwig wrote:
>> The GD-ROM driver does not have a ->revalidate_disk method, so it can
>       ^^ (sic)

No, this really is the GD-ROM and not the CD-ROM driver!
diff mbox series

Patch

diff --git a/drivers/cdrom/gdrom.c b/drivers/cdrom/gdrom.c
index 09b0cd292720fa..9874fc1c815b53 100644
--- a/drivers/cdrom/gdrom.c
+++ b/drivers/cdrom/gdrom.c
@@ -479,7 +479,7 @@  static int gdrom_bdops_open(struct block_device *bdev, fmode_t mode)
 {
 	int ret;
 
-	check_disk_change(bdev);
+	bdev_check_media_change(bdev);
 
 	mutex_lock(&gdrom_mutex);
 	ret = cdrom_open(gd.cd_info, bdev, mode);