Skip to content

Commit 97f94a5

Browse files
Mohamed Khalfellaopsiff
authored andcommitted
nvmet: exit debugfs after discovery subsystem exits
[ Upstream commit 80f21806b8e34ae1e24c0fc6a0f0dfd9b055e130 ] Commit 528589947c180 ("nvmet: initialize discovery subsys after debugfs is initialized") changed nvmet_init() to initialize nvme discovery after "nvmet" debugfs directory is initialized. The change broke nvmet_exit() because discovery subsystem now depends on debugfs. Debugfs should be destroyed after discovery subsystem. Fix nvmet_exit() to do that. Reported-by: Yi Zhang <[email protected]> Closes: https://lore.kernel.org/all/CAHj4cs96AfFQpyDKF_MdfJsnOEo=2V7dQgqjFv+k3t7H-=yGhA@mail.gmail.com/ Fixes: 528589947c180 ("nvmet: initialize discovery subsys after debugfs is initialized") Signed-off-by: Mohamed Khalfella <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Reviewed-by: Daniel Wagner <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]> Signed-off-by: Sasha Levin <[email protected]> (cherry picked from commit 7d0f3072f999dd6aa4d51ffdd8989ddf2ed1caaa)
1 parent 1aa60ee commit 97f94a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/nvme/target/core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1746,8 +1746,8 @@ static int __init nvmet_init(void)
17461746
static void __exit nvmet_exit(void)
17471747
{
17481748
nvmet_exit_configfs();
1749-
nvmet_exit_debugfs();
17501749
nvmet_exit_discovery();
1750+
nvmet_exit_debugfs();
17511751
ida_destroy(&cntlid_ida);
17521752
destroy_workqueue(nvmet_wq);
17531753
destroy_workqueue(buffered_io_wq);

0 commit comments

Comments
 (0)