[Devel] [PATCH VZ9] fs/fuse kio: destruct fuse ktrace at the end of kio destruction

Liu Kui kui.liu at virtuozzo.com
Thu Feb 13 19:49:53 MSK 2025


Apparently ktrace could still be used during kio destruction. An absence
of ktrace can trigger the WARN_ON check in pcs_rpc_report_error(). While
it's not fatal functionally, it does fail testcases, so fix it here.

Related to #VSTOR-99621
Signed-off-by: Liu Kui <kui.liu at virtuozzo.com>
---
 fs/fuse/kio/pcs/pcs_fuse_kdirect.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/fs/fuse/kio/pcs/pcs_fuse_kdirect.c b/fs/fuse/kio/pcs/pcs_fuse_kdirect.c
index 0aeb166eecb1..8da9550cc156 100644
--- a/fs/fuse/kio/pcs/pcs_fuse_kdirect.c
+++ b/fs/fuse/kio/pcs/pcs_fuse_kdirect.c
@@ -297,9 +297,6 @@ static void kpcs_conn_fini(struct fuse_mount *fm)
 {
 	struct fuse_conn *fc = fm->fc;
 
-	if (fc->ktrace)
-		fuse_ktrace_remove(fc);
-
 	if (!fc->kio.ctx)
 		return;
 
@@ -310,6 +307,9 @@ static void kpcs_conn_fini(struct fuse_mount *fm)
 	flush_workqueue(pcs_cpu_wq);
 	flush_workqueue(pcs_cleanup_wq);
 	pcs_cluster_fini((struct pcs_fuse_cluster *) fc->kio.ctx);
+
+	if (fc->ktrace)
+		fuse_ktrace_remove(fc);
 }
 
 static void kpcs_conn_abort(struct fuse_conn *fc)
-- 
2.39.5 (Apple Git-154)



More information about the Devel mailing list