Re: [syzbot] [gfs2?] WARNING: locking bug in gfs2_fill_super

From: Edward Adam Davis
Date: Thu Jun 06 2024 - 11:36:35 EST


please test wr in gfs2_fill_super

#syz test https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git 9d99040b1bc8

diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c
index 0561edd6cc86..7288a6221fde 100644
--- a/fs/gfs2/ops_fstype.c
+++ b/fs/gfs2/ops_fstype.c
@@ -1308,6 +1308,7 @@ static int gfs2_fill_super(struct super_block *sb, struct fs_context *fc)
fail_delete_wq:
destroy_workqueue(sdp->sd_delete_wq);
fail_glock_wq:
+ flush_workqueue(sdp->sd_glock_wq);
destroy_workqueue(sdp->sd_glock_wq);
fail_free:
free_sbd(sdp);