]> git.baikalelectronics.ru Git - kernel.git/commit
block: Suppress uevent for hidden device when removed
authorDaniel Wagner <dwagner@suse.de>
Thu, 11 Mar 2021 15:19:17 +0000 (16:19 +0100)
committerJens Axboe <axboe@kernel.dk>
Thu, 11 Mar 2021 18:48:25 +0000 (11:48 -0700)
commitf97b0cb31096ef58cbbf714c34057534c9fd1e81
tree6add60cb9ca2bcb03a2580a53c0b37a4b7e4b332
parent9149fb9594189413e3b574262744cb25cb995cba
block: Suppress uevent for hidden device when removed

register_disk() suppress uevents for devices with the GENHD_FL_HIDDEN
but enables uevents at the end again in order to announce disk after
possible partitions are created.

When the device is removed the uevents are still on and user land sees
'remove' messages for devices which were never 'add'ed to the system.

  KERNEL[95481.571887] remove   /devices/virtual/nvme-fabrics/ctl/nvme5/nvme0c5n1 (block)

Let's suppress the uevents for GENHD_FL_HIDDEN by not enabling the
uevents at all.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Martin Wilck <mwilck@suse.com>
Link: https://lore.kernel.org/r/20210311151917.136091-1-dwagner@suse.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/genhd.c