Skip to content

Commit

Permalink
block: don't skip empty device in in disk_uevent
Browse files Browse the repository at this point in the history
Restore the previous behavior by using the correct flag for the whole device
("part0").

Fixes: 99dfc43 ("block: use ->bi_bdev for bio based I/O accounting")
Reported-by: John Stultz <[email protected]>
Tested-by: John Stultz <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
Christoph Hellwig authored and axboe committed Feb 23, 2021
1 parent c0ea576 commit 75ab6af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion block/genhd.c
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ void disk_uevent(struct gendisk *disk, enum kobject_action action)
struct disk_part_iter piter;
struct block_device *part;

disk_part_iter_init(&piter, disk, DISK_PITER_INCL_PART0);
disk_part_iter_init(&piter, disk, DISK_PITER_INCL_EMPTY_PART0);
while ((part = disk_part_iter_next(&piter)))
kobject_uevent(bdev_kobj(part), action);
disk_part_iter_exit(&piter);
Expand Down

0 comments on commit 75ab6af

Please sign in to comment.