[PATCH 06/21] Call thread_finish_main() after ngnfs_unmount() in debugfs

Valerie Aurora val at versity.com
Tue Feb 11 13:19:03 PST 2025


thread_finish_main() should be called after all RCU and trace users
have finished, so after ngnfs_unmount(). If we do it the other way, we
get some interesting crashes.

Signed-off-by: Valerie Aurora <val at versity.com>
---
 cli/debugfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cli/debugfs.c b/cli/debugfs.c
index 368187c..d2895ea 100644
--- a/cli/debugfs.c
+++ b/cli/debugfs.c
@@ -264,8 +264,8 @@ static int debugfs_func(int argc, char **argv)
 
 	thread_stop_indicate(&thr);
 	thread_stop_wait(&thr);
-	thread_finish_main();
 	ngnfs_unmount(&nfi);
+	thread_finish_main();
 out:
 	return ret ?: ctx.ret;
 }
-- 
2.48.1




More information about the ngnfs-devel mailing list