diff options
author | Bob Peterson <rpeterso@redhat.com> | 2014-06-02 09:40:25 -0400 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2014-06-02 14:12:06 -0400 |
commit | 0e48e055a7dfc0cf17bbabe4d9b523ee0b1a9ed6 (patch) | |
tree | 735690948db93970fda788ca9be1e859eed760d9 /fs/gfs2/sys.c | |
parent | 9dd868e1c009fa1c51bf8d349cda77e0188189fd (diff) |
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 <rpeterso@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/sys.c')
-rw-r--r-- | fs/gfs2/sys.c | 3 |
1 files changed, 3 insertions, 0 deletions
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) | |||
407 | struct gfs2_jdesc *jd; | 407 | struct gfs2_jdesc *jd; |
408 | int rv; | 408 | int rv; |
409 | 409 | ||
410 | /* Wait for our primary journal to be initialized */ | ||
411 | wait_for_completion(&sdp->sd_journal_ready); | ||
412 | |||
410 | spin_lock(&sdp->sd_jindex_spin); | 413 | spin_lock(&sdp->sd_jindex_spin); |
411 | rv = -EBUSY; | 414 | rv = -EBUSY; |
412 | if (sdp->sd_jdesc->jd_jid == jid) | 415 | if (sdp->sd_jdesc->jd_jid == jid) |