linux/block
Christoph Hellwig 99d055b4fd block: remove per-disk debugfs files in blk_unregister_queue
The block debugfs files are created in blk_register_queue, which is
called by add_disk and use a naming scheme based on the disk_name.
After del_gendisk returns that name can be reused and thus we must not
leave these debugfs files around, otherwise the kernel is unhappy
and spews messages like:

	Directory XXXXX with parent 'block' already present!

and the newly created devices will not have working debugfs files.

Move the unregistration to blk_unregister_queue instead (which matches
the sysfs unregistration) to make sure the debugfs life time rules match
those of the disk name.

As part of the move also make sure the whole debugfs unregistration is
inside a single debugfs_mutex critical section.

Note that this breaks blktests block/002, which checks that the debugfs
directory has not been removed while blktests is running, but that
particular check should simply be removed from the test case.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20220614074827.458955-4-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-06-17 07:31:05 -06:00
..
partitions for-5.19/drivers-2022-05-22 2022-05-23 14:04:14 -07:00
badblocks.c
bdev.c Description for this pull request: 2022-05-24 18:30:27 -07:00
bfq-cgroup.c
bfq-iosched.c block/bfq: Enable I/O statistics 2022-06-16 16:59:28 -06:00
bfq-iosched.h bfq: Relax waker detection for shared queues 2022-05-19 06:52:33 -06:00
bfq-wf2q.c
bio-integrity.c
bio.c block: remove bioset_init_from_src 2022-06-08 14:04:14 -04:00
blk-cgroup-fc-appid.c
blk-cgroup-rwstat.c
blk-cgroup-rwstat.h
blk-cgroup.c block: fix bio_clone_blkg_association() to associate with proper blkcg_gq 2022-06-02 02:15:05 -06:00
blk-cgroup.h blk-cgroup: always terminate io.stat lines 2022-05-17 06:11:17 -06:00
blk-core.c block: disable the elevator int del_gendisk 2022-06-17 07:31:05 -06:00
blk-crypto-fallback.c block: remove superfluous calls to blkcg_bio_issue_init 2022-05-04 18:29:52 -06:00
blk-crypto-internal.h
blk-crypto-profile.c
blk-crypto-sysfs.c
blk-crypto.c
blk-flush.c
blk-ia-ranges.c block: Fix potential deadlock in blk_ia_range_sysfs_show() 2022-06-02 23:02:37 -06:00
blk-integrity.c
blk-ioc.c
blk-iocost.c for-5.19/block-2022-05-22 2022-05-23 13:56:39 -07:00
blk-iolatency.c blk-iolatency: Fix inflight count imbalances and IO hangs on offline 2022-05-26 11:43:00 -06:00
blk-ioprio.c
blk-ioprio.h
blk-lib.c
blk-map.c
blk-merge.c
blk-mq-cpumap.c
blk-mq-debugfs-zoned.c
blk-mq-debugfs.c block: remove per-disk debugfs files in blk_unregister_queue 2022-06-17 07:31:05 -06:00
blk-mq-debugfs.h block: remove per-disk debugfs files in blk_unregister_queue 2022-06-17 07:31:05 -06:00
blk-mq-pci.c
blk-mq-rdma.c
blk-mq-sched.c block: serialize all debugfs operations using q->debugfs_mutex 2022-06-17 07:31:05 -06:00
blk-mq-sched.h
blk-mq-sysfs.c
blk-mq-tag.c block: remove useless BUG_ON() in blk_mq_put_tag() 2022-06-02 02:05:56 -06:00
blk-mq-tag.h
blk-mq-virtio.c
blk-mq.c blk-mq: don't clear flush_rq from tags->rqs[] 2022-06-16 14:45:15 -06:00
blk-mq.h
blk-pm.c
blk-pm.h
blk-rq-qos.c block: remove per-disk debugfs files in blk_unregister_queue 2022-06-17 07:31:05 -06:00
blk-rq-qos.h block: serialize all debugfs operations using q->debugfs_mutex 2022-06-17 07:31:05 -06:00
blk-settings.c
blk-stat.c
blk-stat.h
blk-sysfs.c block: remove per-disk debugfs files in blk_unregister_queue 2022-06-17 07:31:05 -06:00
blk-throttle.c blk-throttle: Set BIO_THROTTLED when bio has been throttled 2022-05-17 19:32:10 -06:00
blk-throttle.h
blk-timeout.c
blk-wbt.c
blk-wbt.h
blk-zoned.c
blk.h
bounce.c block: remove superfluous calls to blkcg_bio_issue_init 2022-05-04 18:29:52 -06:00
bsg-lib.c
bsg.c
disk-events.c
elevator.c
elevator.h
fops.c Page cache changes for 5.19 2022-05-24 19:55:07 -07:00
genhd.c block: disable the elevator int del_gendisk 2022-06-17 07:31:05 -06:00
holder.c
ioctl.c
ioprio.c
Kconfig
Kconfig.iosched
kyber-iosched.c blk-mq: avoid to touch q->elevator without any protection 2022-06-16 14:45:15 -06:00
Makefile
mq-deadline.c blk-mq: avoid to touch q->elevator without any protection 2022-06-16 14:45:15 -06:00
opal_proto.h
sed-opal.c
t10-pi.c