diff options
Diffstat (limited to 'fs/gfs2/recovery.c')
-rw-r--r-- | fs/gfs2/recovery.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/fs/gfs2/recovery.c b/fs/gfs2/recovery.c index 68c85610fb5b..e91c2bda6c32 100644 --- a/fs/gfs2/recovery.c +++ b/fs/gfs2/recovery.c | |||
@@ -418,7 +418,6 @@ static int clean_journal(struct gfs2_jdesc *jd, struct gfs2_log_header *head) | |||
418 | /** | 418 | /** |
419 | * gfs2_recover_journal - recovery a given journal | 419 | * gfs2_recover_journal - recovery a given journal |
420 | * @jd: the struct gfs2_jdesc describing the journal | 420 | * @jd: the struct gfs2_jdesc describing the journal |
421 | * @wait: Don't return until the journal is clean (or an error is encountered) | ||
422 | * | 421 | * |
423 | * Acquire the journal's lock, check to see if the journal is clean, and | 422 | * Acquire the journal's lock, check to see if the journal is clean, and |
424 | * do recovery if necessary. | 423 | * do recovery if necessary. |
@@ -426,7 +425,7 @@ static int clean_journal(struct gfs2_jdesc *jd, struct gfs2_log_header *head) | |||
426 | * Returns: errno | 425 | * Returns: errno |
427 | */ | 426 | */ |
428 | 427 | ||
429 | int gfs2_recover_journal(struct gfs2_jdesc *jd, int wait) | 428 | int gfs2_recover_journal(struct gfs2_jdesc *jd) |
430 | { | 429 | { |
431 | struct gfs2_inode *ip = jd->jd_inode->u.generic_ip; | 430 | struct gfs2_inode *ip = jd->jd_inode->u.generic_ip; |
432 | struct gfs2_sbd *sdp = ip->i_sbd; | 431 | struct gfs2_sbd *sdp = ip->i_sbd; |
@@ -441,12 +440,10 @@ int gfs2_recover_journal(struct gfs2_jdesc *jd, int wait) | |||
441 | 440 | ||
442 | /* Aquire the journal lock so we can do recovery */ | 441 | /* Aquire the journal lock so we can do recovery */ |
443 | 442 | ||
444 | error = gfs2_glock_nq_num(sdp, | 443 | error = gfs2_glock_nq_num(sdp, jd->jd_jid, &gfs2_journal_glops, |
445 | jd->jd_jid, &gfs2_journal_glops, | ||
446 | LM_ST_EXCLUSIVE, | 444 | LM_ST_EXCLUSIVE, |
447 | LM_FLAG_NOEXP | | 445 | LM_FLAG_NOEXP | LM_FLAG_TRY | GL_NOCACHE, |
448 | ((wait) ? 0 : LM_FLAG_TRY) | | 446 | &j_gh); |
449 | GL_NOCACHE, &j_gh); | ||
450 | switch (error) { | 447 | switch (error) { |
451 | case 0: | 448 | case 0: |
452 | break; | 449 | break; |
@@ -574,7 +571,7 @@ void gfs2_check_journals(struct gfs2_sbd *sdp) | |||
574 | break; | 571 | break; |
575 | 572 | ||
576 | if (jd != sdp->sd_jdesc) | 573 | if (jd != sdp->sd_jdesc) |
577 | gfs2_recover_journal(jd, NO_WAIT); | 574 | gfs2_recover_journal(jd); |
578 | } | 575 | } |
579 | } | 576 | } |
580 | 577 | ||