1
0
Fork 0

block: don't send uevent for empty disk when not invalidating

Commit 6917d06899 ("block: merge invalidate_partitions into
rescan_partitions") caused a regression where systemd-udevd spins
forever using max CPU starting at boot time.

It's caused by a behavior change where a KOBJ_CHANGE uevent is now sent
in a case where previously it wasn't.

Restore the old behavior.

Fixes: 6917d06899 ("block: merge invalidate_partitions into rescan_partitions")
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
alistair/sunxi64-5.5-dsi
Eric Biggers 2019-12-02 10:21:34 -08:00 committed by Jens Axboe
parent 441cdbd544
commit 490547ca2d
1 changed files with 1 additions and 1 deletions

View File

@ -1531,7 +1531,7 @@ rescan:
ret = blk_add_partitions(disk, bdev);
if (ret == -EAGAIN)
goto rescan;
} else {
} else if (invalidate) {
/*
* Tell userspace that the media / partition table may have
* changed.