Skip to content

Commit 0c89689

Browse files
author
Andreas Gruenbacher
committed
gfs2: Simplify clean_journal
JIRA: https://issues.redhat.com/browse/RHEL-91331 Upstream Status: https://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2.git 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]> (cherry picked from commit 8744fc04d0c56a74ea546b60b5ea207bde224a75)
1 parent f2a482e commit 0c89689

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
@@ -263,10 +263,10 @@ static void clean_journal(struct gfs2_jdesc *jd,
263263
struct gfs2_log_header_host *head)
264264
{
265265
struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode);
266-
u32 lblock = head->lh_blkno;
267266

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

0 commit comments

Comments
 (0)