mirror of
https://github.com/torvalds/linux.git
synced 2025-08-15 22:21:42 +02:00
nvmet: initialize discovery subsys after debugfs is initialized
During nvme target initialization discovery subsystem is initialized
before "nvmet" debugfs directory is created. This results in discovery
subsystem debugfs directory to be created in debugfs root directory.
nvmet_init() ->
nvmet_init_discovery() ->
nvmet_subsys_alloc() ->
nvmet_debugfs_subsys_setup()
In other words, the codepath above is exeucted before nvmet_debugfs is
created. We get /sys/kernel/debug/nqn.2014-08.org.nvmexpress.discovery
instead of /sys/kernel/debug/nvmet/nqn.2014-08.org.nvmexpress.discovery.
Move nvmet_init_discovery() call after nvmet_init_debugfs() to fix it.
Fixes: 649fd41420
("nvmet: add debugfs support")
Signed-off-by: Mohamed Khalfella <mkhalfella@purestorage.com>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Reviewed-by: Hannes Reinecke <hare@kernel.org>
Reviewed-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
parent
e715b8733d
commit
528589947c
1 changed files with 8 additions and 8 deletions
|
@ -1960,24 +1960,24 @@ static int __init nvmet_init(void)
|
|||
if (!nvmet_wq)
|
||||
goto out_free_buffered_work_queue;
|
||||
|
||||
error = nvmet_init_discovery();
|
||||
error = nvmet_init_debugfs();
|
||||
if (error)
|
||||
goto out_free_nvmet_work_queue;
|
||||
|
||||
error = nvmet_init_debugfs();
|
||||
if (error)
|
||||
goto out_exit_discovery;
|
||||
|
||||
error = nvmet_init_configfs();
|
||||
error = nvmet_init_discovery();
|
||||
if (error)
|
||||
goto out_exit_debugfs;
|
||||
|
||||
error = nvmet_init_configfs();
|
||||
if (error)
|
||||
goto out_exit_discovery;
|
||||
|
||||
return 0;
|
||||
|
||||
out_exit_debugfs:
|
||||
nvmet_exit_debugfs();
|
||||
out_exit_discovery:
|
||||
nvmet_exit_discovery();
|
||||
out_exit_debugfs:
|
||||
nvmet_exit_debugfs();
|
||||
out_free_nvmet_work_queue:
|
||||
destroy_workqueue(nvmet_wq);
|
||||
out_free_buffered_work_queue:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue