summaryrefslogtreecommitdiffstats
path: root/fs/block_dev.c
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2019-12-02 10:21:34 -0800
committerJens Axboe <axboe@kernel.dk>2019-12-02 18:49:30 -0700
commit490547ca2df66b8413bce97cb651630f2c531487 (patch)
tree7510e3c0c5b2744a6d8f0aa70bdb211380b5e4b7 /fs/block_dev.c
parent441cdbd5449b4923cd413d3ba748124f91388be9 (diff)
downloadlinux-490547ca2df66b8413bce97cb651630f2c531487.tar.bz2
block: don't send uevent for empty disk when not invalidating
Commit 6917d0689993 ("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: 6917d0689993 ("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>
Diffstat (limited to 'fs/block_dev.c')
-rw-r--r--fs/block_dev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/block_dev.c b/fs/block_dev.c
index ee63c2732fa2..69bf2fb6f7cd 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@ -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.