Thread (4 messages) 4 messages, 4 authors, 2025-08-07

Re: [PATCH] nvmet: exit debugfs after discovery subsystem exits

From: Hannes Reinecke <hare@suse.de>
Date: 2025-08-07 08:23:11
Also in: linux-nvme, lkml

On 8/7/25 07:35, Mohamed Khalfella wrote:
quoted hunk ↗ jump to hunk
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 <redacted>
Closes: https://lore.kernel.org/all/CAHj4cs96AfFQpyDKF_MdfJsnOEo=2V7dQgqjFv+k3t7H-=yGhA@mail.gmail.com/ (local)
Fixes: 528589947c180 ("nvmet: initialize discovery subsys after debugfs is initialized")
Signed-off-by: Mohamed Khalfella <redacted>
---
  drivers/nvme/target/core.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/nvme/target/core.c b/drivers/nvme/target/core.c
index 83f3d2f8ef2d0..0dd7bd99afa32 100644
--- a/drivers/nvme/target/core.c
+++ b/drivers/nvme/target/core.c
@@ -1992,8 +1992,8 @@ static int __init nvmet_init(void)
  static void __exit nvmet_exit(void)
  {
  	nvmet_exit_configfs();
-	nvmet_exit_debugfs();
  	nvmet_exit_discovery();
+	nvmet_exit_debugfs();
  	ida_destroy(&cntlid_ida);
  	destroy_workqueue(nvmet_wq);
  	destroy_workqueue(buffered_io_wq);
Hehe. I knew this would've been the case once I've seen the latest
blktest failure. Thanks for fixing it.

Reviewed-by: Hannes Reinecke <hare@suse.de>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke                  Kernel Storage Architect
hare@suse.de                                +49 911 74053 688
SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg
HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help