diff mbox series

[09/17] floppy: call disk_force_media_change when changing the format

Message ID 20230811100828.1897174-10-hch@lst.de (mailing list archive)
State New, archived
Headers show
Series [01/17] FOLD: reverts part of "fs: use the super_block as holder when mounting file systems" | expand

Commit Message

Christoph Hellwig Aug. 11, 2023, 10:08 a.m. UTC
While changing the format of a floppy isn't strictly speaking a media
change, the effects are the same in that the content of the media
changes and the diskseq should be increased and uevent should be
sent.  Switch from calling __invalidate_device to
disk_force_media_change to do so.

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

Patch

diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c
index 2db9b186b977ac..ea4eb88a2e45f4 100644
--- a/drivers/block/floppy.c
+++ b/drivers/block/floppy.c
@@ -3255,7 +3255,7 @@  static int set_geometry(unsigned int cmd, struct floppy_struct *g,
 
 			if (!disk || ITYPE(drive_state[cnt].fd_device) != type)
 				continue;
-			__invalidate_device(disk->part0, true);
+			disk_force_media_change(disk);
 		}
 		mutex_unlock(&open_lock);
 	} else {