Message ID | 20210623105858.6978-6-mcroce@linux.microsoft.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | block: add a sequence number to disks | expand |
diff --git a/block/genhd.c b/block/genhd.c index 768d8d5d1eca..9d58e0ea18ae 100644 --- a/block/genhd.c +++ b/block/genhd.c @@ -1657,6 +1657,9 @@ static void disk_check_events(struct disk_events *ev, spin_unlock_irq(&ev->lock); + if (events & DISK_EVENT_MEDIA_CHANGE) + inc_diskseq(disk); + /* * Tell userland about new events. Only the events listed in * @disk->events are reported, and only if DISK_EVENT_FLAG_UEVENT