diff options
author | Andreas Gruenbacher <agruenba@redhat.com> | 2025-05-17 08:28:14 +0200 |
---|---|---|
committer | Andreas Gruenbacher <agruenba@redhat.com> | 2025-05-22 09:12:27 +0200 |
commit | 2ebb94ab93c3e4052f1d76275534d0ff46fc9b91 (patch) | |
tree | bcd1f5980a71e61d8be1a93a2bbbeda07c2971b2 | |
parent | 8a43d2187691f1f2b9db66f6b08afcc8a1b3095a (diff) |
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 <agruenba@redhat.com>
-rw-r--r-- | fs/gfs2/recovery.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/gfs2/recovery.c b/fs/gfs2/recovery.c index db1238480e91b..5e37574820b7c 100644 --- a/fs/gfs2/recovery.c +++ b/fs/gfs2/recovery.c @@ -264,10 +264,10 @@ static void clean_journal(struct gfs2_jdesc *jd, struct gfs2_log_header_host *head) { struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode); - u32 lblock = head->lh_blkno; - gfs2_replay_incr_blk(jd, &lblock); - gfs2_write_log_header(sdp, jd, head->lh_sequence + 1, 0, lblock, + gfs2_replay_incr_blk(jd, &head->lh_blkno); + head->lh_sequence++; + gfs2_write_log_header(sdp, jd, head->lh_sequence, 0, head->lh_blkno, GFS2_LOG_HEAD_UNMOUNT | GFS2_LOG_HEAD_RECOVERY, REQ_PREFLUSH | REQ_FUA | REQ_META | REQ_SYNC); } |