block: pass a gendisk to bdev_disk_changed
bdev_disk_changed can only operate on whole devices. Make that clear by passing a gendisk instead of the struct block_device. Signed-off-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20210624123240.441814-3-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
committed by
Jens Axboe
parent
630161cfdf
commit
0384264ea8
@@ -1253,7 +1253,7 @@ static int blkdev_get_whole(struct block_device *bdev, fmode_t mode)
|
||||
/* avoid ghost partitions on a removed medium */
|
||||
if (ret == -ENOMEDIUM &&
|
||||
test_bit(GD_NEED_PART_SCAN, &disk->state))
|
||||
bdev_disk_changed(bdev, true);
|
||||
bdev_disk_changed(disk, true);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
@@ -1264,7 +1264,7 @@ static int blkdev_get_whole(struct block_device *bdev, fmode_t mode)
|
||||
bdev->bd_bdi = bdi_get(disk->queue->backing_dev_info);
|
||||
}
|
||||
if (test_bit(GD_NEED_PART_SCAN, &disk->state))
|
||||
bdev_disk_changed(bdev, false);
|
||||
bdev_disk_changed(disk, false);
|
||||
bdev->bd_openers++;
|
||||
return 0;;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user