[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20220121060122.998512-1-lv.ruyi@zte.com.cn>
Date: Fri, 21 Jan 2022 06:01:22 +0000
From: cgel.zte@...il.com
To: rpeterso@...hat.com
Cc: agruenba@...hat.com, cluster-devel@...hat.com,
linux-kernel@...r.kernel.org, Lv Ruyi <lv.ruyi@....com.cn>,
Zeal Robot <zealci@....com.cn>, CGEL ZTE <cgel.zte@...il.com>
Subject: [PATCH] GFS2: move sleep outside the spinlock
From: Lv Ruyi <lv.ruyi@....com.cn>
Don't sleep with spinlock held, so move it outside critical section.
Reported-by: Zeal Robot <zealci@....com.cn>
Signed-off-by: Lv Ruyi <lv.ruyi@....com.cn>
Signed-off-by: CGEL ZTE <cgel.zte@...il.com>
---
fs/gfs2/lock_dlm.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/gfs2/lock_dlm.c b/fs/gfs2/lock_dlm.c
index 50578f881e6d..e43b33b115b4 100644
--- a/fs/gfs2/lock_dlm.c
+++ b/fs/gfs2/lock_dlm.c
@@ -942,14 +942,15 @@ static int control_mount(struct gfs2_sbd *sdp)
if (sdp->sd_args.ar_spectator) {
fs_info(sdp, "Recovery is required. Waiting for a "
"non-spectator to mount.\n");
+ spin_unlock(&ls->ls_recover_spin);
msleep_interruptible(1000);
} else {
fs_info(sdp, "control_mount wait1 block %u start %u "
"mount %u lvb %u flags %lx\n", block_gen,
start_gen, mount_gen, lvb_gen,
ls->ls_recover_flags);
+ spin_unlock(&ls->ls_recover_spin);
}
- spin_unlock(&ls->ls_recover_spin);
goto restart;
}
--
2.25.1
Powered by blists - more mailing lists