summaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2020-07-08 14:25:41 +0200
committerJens Axboe <axboe@kernel.dk>2020-07-08 16:19:47 -0600
commita564e23f0f99759f453dbefcb9160dec6d99df96 (patch)
tree85276e79d4624c891bc37341e87c29e7b5e8ebd6 /block
parent568f2700657794b8258e72983ba508793a658942 (diff)
md: switch to ->check_events for media change notifications
md is the last driver using the legacy media_changed method. Switch it over to (not so) new ->clear_events approach, which also removes the need for the ->revalidate_disk method. Signed-off-by: Christoph Hellwig <hch@lst.de> [axboe: remove unused 'bdops' variable in disk_clear_events()] Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block')
-rw-r--r--block/genhd.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/block/genhd.c b/block/genhd.c
index 60ae4e1b4d38..c42a49f2f537 100644
--- a/block/genhd.c
+++ b/block/genhd.c
@@ -2056,18 +2056,12 @@ void disk_flush_events(struct gendisk *disk, unsigned int mask)
*/
unsigned int disk_clear_events(struct gendisk *disk, unsigned int mask)
{
- const struct block_device_operations *bdops = disk->fops;
struct disk_events *ev = disk->ev;
unsigned int pending;
unsigned int clearing = mask;
- if (!ev) {
- /* for drivers still using the old ->media_changed method */
- if ((mask & DISK_EVENT_MEDIA_CHANGE) &&
- bdops->media_changed && bdops->media_changed(disk))
- return DISK_EVENT_MEDIA_CHANGE;
+ if (!ev)
return 0;
- }
disk_block_events(disk);