summaryrefslogtreecommitdiffstats
path: root/block/genhd.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2021-02-23 23:41:25 +0100
committerJens Axboe <axboe@kernel.dk>2021-02-23 23:41:25 +0100
commit75ab6afacda01a6bd2d3ecd4cb8485f7c8fa2fdb (patch)
tree3607303c658f1f1f1a527187e192a3bc2714faa9 /block/genhd.c
parentblktrace: remove debugfs file dentries from struct blk_trace (diff)
downloadlinux-75ab6afacda01a6bd2d3ecd4cb8485f7c8fa2fdb.tar.xz
linux-75ab6afacda01a6bd2d3ecd4cb8485f7c8fa2fdb.zip
block: don't skip empty device in in disk_uevent
Restore the previous behavior by using the correct flag for the whole device ("part0"). Fixes: 99dfc43ecbf6 ("block: use ->bi_bdev for bio based I/O accounting") Reported-by: John Stultz <john.stultz@linaro.org> Tested-by: John Stultz <john.stultz@linaro.org> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/genhd.c')
-rw-r--r--block/genhd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/genhd.c b/block/genhd.c
index 36ff45bbaaaf..6379b000576c 100644
--- a/block/genhd.c
+++ b/block/genhd.c
@@ -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);