diff options
author | Christoph Hellwig <hch@lst.de> | 2020-09-08 17:53:36 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-09-10 18:32:31 +0300 |
commit | f094225bfcd6fc5c093e128ec0adb7a522b38b69 (patch) | |
tree | 3b72423fb6fc8f73ef26768750dc0f8dfc9f554e /drivers | |
parent | 3dcbad297b9976394190ee40913b53e50e9c83f2 (diff) | |
download | linux-f094225bfcd6fc5c093e128ec0adb7a522b38b69.tar.xz |
xsysace: use bdev_check_media_change
Switch to use bdev_check_media_change instead of check_disk_change and
call ace_revalidate_disk manually. Given that ace_revalidate_disk 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: Christoph Hellwig <hch@lst.de>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/block/xsysace.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/block/xsysace.c b/drivers/block/xsysace.c index 5d8e0ab3f054..eefe542f2d9f 100644 --- a/drivers/block/xsysace.c +++ b/drivers/block/xsysace.c @@ -922,7 +922,8 @@ static int ace_open(struct block_device *bdev, fmode_t mode) ace->users++; spin_unlock_irqrestore(&ace->lock, flags); - check_disk_change(bdev); + if (bdev_check_media_change(bdev)) + ace_revalidate_disk(bdev->bd_disk); mutex_unlock(&xsysace_mutex); return 0; @@ -966,7 +967,6 @@ static const struct block_device_operations ace_fops = { .open = ace_open, .release = ace_release, .check_events = ace_check_events, - .revalidate_disk = ace_revalidate_disk, .getgeo = ace_getgeo, }; |