summaryrefslogtreecommitdiff
path: root/drivers/block/swim.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2023-06-08 13:02:35 +0200
committerJens Axboe <axboe@kernel.dk>2023-06-12 08:04:03 -0600
commit444aa2c58cb3b6cfe3b7cc7db6c294d73393a894 (patch)
tree250825e269bcdb6c4ed561ea581be0587f4497df /drivers/block/swim.c
parent7ae24fcee9929f9002b84d8121144b2b3590b58c (diff)
block: pass a gendisk on bdev_check_media_change
bdev_check_media_change should only ever be called for the whole device. Pass a gendisk to make that explicit and rename the function to disk_check_media_change. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Hannes Reinecke <hare@suse.de> Acked-by: Christian Brauner <brauner@kernel.org> Link: https://lore.kernel.org/r/20230608110258.189493-8-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block/swim.c')
-rw-r--r--drivers/block/swim.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/swim.c b/drivers/block/swim.c
index 42b4b6828690..105bc5fd1b8c 100644
--- a/drivers/block/swim.c
+++ b/drivers/block/swim.c
@@ -640,7 +640,7 @@ static int floppy_open(struct block_device *bdev, fmode_t mode)
return 0;
if (mode & (FMODE_READ|FMODE_WRITE)) {
- if (bdev_check_media_change(bdev) && fs->disk_in)
+ if (disk_check_media_change(bdev->bd_disk) && fs->disk_in)
fs->ejected = 0;
if ((mode & FMODE_WRITE) && fs->write_protected) {
err = -EROFS;