summaryrefslogtreecommitdiffstats
path: root/fs/gfs2/log.h
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruenba@redhat.com>2020-12-19 07:15:17 +0100
committerAndreas Gruenbacher <agruenba@redhat.com>2021-02-03 18:37:25 +0100
commit5cb738b5fbd2f3ebe9dec0e428577a4f2128adbe (patch)
treea7cf4778bbc44272e6e15e05d4261a745ab94cb6 /fs/gfs2/log.h
parentgfs2: Use a tighter bound in gfs2_trans_begin (diff)
downloadlinux-5cb738b5fbd2f3ebe9dec0e428577a4f2128adbe.tar.xz
linux-5cb738b5fbd2f3ebe9dec0e428577a4f2128adbe.zip
gfs2: Get rid of current_tail()
Keep the current value of the updated log tail in the super block as sb_log_flush_tail instead of computing it on the fly. This avoids unnecessary sd_ail_lock taking and cleans up the code. Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Diffstat (limited to 'fs/gfs2/log.h')
-rw-r--r--fs/gfs2/log.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/gfs2/log.h b/fs/gfs2/log.h
index cbc097ca9244..b36a3539f352 100644
--- a/fs/gfs2/log.h
+++ b/fs/gfs2/log.h
@@ -43,7 +43,9 @@ static inline void gfs2_log_pointers_init(struct gfs2_sbd *sdp,
if (++value == sdp->sd_jdesc->jd_blocks) {
value = 0;
}
- sdp->sd_log_head = sdp->sd_log_tail = value;
+ sdp->sd_log_tail = value;
+ sdp->sd_log_flush_tail = value;
+ sdp->sd_log_head = value;
}
static inline void gfs2_ordered_add_inode(struct gfs2_inode *ip)