diff options
author | Christoph Hellwig <hch@lst.de> | 2020-07-08 15:25:41 +0300 |
---|---|---|
committer | Sasha Levin <sashal@kernel.org> | 2024-03-27 01:22:34 +0300 |
commit | dc51c01a3d5a796e18520a186f56e13f8e70749f (patch) | |
tree | a82db180560bafebe7a37f245f494c22c46b94b8 /block | |
parent | b86af4d77a5a2487020794845c1a2e948699630c (diff) | |
download | linux-dc51c01a3d5a796e18520a186f56e13f8e70749f.tar.xz |
md: switch to ->check_events for media change notifications
[ Upstream commit a564e23f0f99759f453dbefcb9160dec6d99df96 ]
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>
Stable-dep-of: 9674f54e41ff ("md: Don't clear MD_CLOSING when the raid is about to stop")
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'block')
-rw-r--r-- | block/genhd.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/block/genhd.c b/block/genhd.c index 27a410d31087..d2502e175aca 100644 --- a/block/genhd.c +++ b/block/genhd.c @@ -1771,18 +1771,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); |