From 0e48e055a7dfc0cf17bbabe4d9b523ee0b1a9ed6 Mon Sep 17 00:00:00 2001 From: Bob Peterson Date: Mon, 2 Jun 2014 09:40:25 -0400 Subject: GFS2: Prevent recovery before the local journal is set This patch uses a completion to prevent dlm's recovery process from referencing and trying to recover a journal before a journal has been opened. Signed-off-by: Bob Peterson Signed-off-by: Steven Whitehouse --- fs/gfs2/sys.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'fs/gfs2/sys.c') diff --git a/fs/gfs2/sys.c b/fs/gfs2/sys.c index 7bc17edcb51f..0e049f9574b5 100644 --- a/fs/gfs2/sys.c +++ b/fs/gfs2/sys.c @@ -407,6 +407,9 @@ int gfs2_recover_set(struct gfs2_sbd *sdp, unsigned jid) struct gfs2_jdesc *jd; int rv; + /* Wait for our primary journal to be initialized */ + wait_for_completion(&sdp->sd_journal_ready); + spin_lock(&sdp->sd_jindex_spin); rv = -EBUSY; if (sdp->sd_jdesc->jd_jid == jid) -- cgit v1.2.3