Skip to content

Commit 2ebb94a

Browse files
author
Andreas Gruenbacher
committed
gfs2: Simplify clean_journal
In function clean_journal(), update @Head to point at the log header that indicates successful recovery: this is where logging needs to resume. Signed-off-by: Andreas Gruenbacher <[email protected]>
1 parent 8a43d21 commit 2ebb94a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

fs/gfs2/recovery.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -264,10 +264,10 @@ static void clean_journal(struct gfs2_jdesc *jd,
264264
struct gfs2_log_header_host *head)
265265
{
266266
struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode);
267-
u32 lblock = head->lh_blkno;
268267

269-
gfs2_replay_incr_blk(jd, &lblock);
270-
gfs2_write_log_header(sdp, jd, head->lh_sequence + 1, 0, lblock,
268+
gfs2_replay_incr_blk(jd, &head->lh_blkno);
269+
head->lh_sequence++;
270+
gfs2_write_log_header(sdp, jd, head->lh_sequence, 0, head->lh_blkno,
271271
GFS2_LOG_HEAD_UNMOUNT | GFS2_LOG_HEAD_RECOVERY,
272272
REQ_PREFLUSH | REQ_FUA | REQ_META | REQ_SYNC);
273273
}

0 commit comments

Comments
 (0)