Commit 3dcbad29 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Jens Axboe

swim3: use bdev_check_media_changed

Switch to use bdev_check_media_changed instead of check_disk_change and
call floppy_revalidate manually.  Given that floppy_revalidate only
deals with media change events, the extra call into ->revalidate_disk
from bdev_disk_changed is not required either, so stop wiring up the
method.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarJohannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: default avatarHannes Reinecke <hare@suse.de>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 433d21ce
...@@ -945,7 +945,8 @@ static int floppy_open(struct block_device *bdev, fmode_t mode) ...@@ -945,7 +945,8 @@ static int floppy_open(struct block_device *bdev, fmode_t mode)
if (err == 0 && (mode & FMODE_NDELAY) == 0 if (err == 0 && (mode & FMODE_NDELAY) == 0
&& (mode & (FMODE_READ|FMODE_WRITE))) { && (mode & (FMODE_READ|FMODE_WRITE))) {
check_disk_change(bdev); if (bdev_check_media_change(bdev))
floppy_revalidate(bdev->bd_disk);
if (fs->ejected) if (fs->ejected)
err = -ENXIO; err = -ENXIO;
} }
...@@ -1055,7 +1056,6 @@ static const struct block_device_operations floppy_fops = { ...@@ -1055,7 +1056,6 @@ static const struct block_device_operations floppy_fops = {
.release = floppy_release, .release = floppy_release,
.ioctl = floppy_ioctl, .ioctl = floppy_ioctl,
.check_events = floppy_check_events, .check_events = floppy_check_events,
.revalidate_disk= floppy_revalidate,
}; };
static const struct blk_mq_ops swim3_mq_ops = { static const struct blk_mq_ops swim3_mq_ops = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment