diff options
author | Andreas Gruenbacher <agruenba@redhat.com> | 2021-02-03 16:15:27 +0100 |
---|---|---|
committer | Andreas Gruenbacher <agruenba@redhat.com> | 2021-02-03 16:33:16 +0100 |
commit | 15e20a301ab06575482c7ab3b442a6830cec928e (patch) | |
tree | 1df898835ae3e188d7268689ba4f4cc6b611d525 /fs/gfs2/trans.c | |
parent | 6e80674af06c0dca6e0153d492d437f3f07fe3e9 (diff) |
gfs2: Use sb_start_intwrite in gfs2_ail_empty_gl
Commit 2e60d7683c8d ("GFS2: update freeze code to use freeze/thaw_super
on all nodes") optimized away the sb_start_intwrite ... sb_end_intwrite
protection for the on-stack transactions in gfs2_ail_empty_gl with no
explanation. I can't think of a valid reason for doing that, so revert
that change. This simplifies the next commit.
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Diffstat (limited to 'fs/gfs2/trans.c')
-rw-r--r-- | fs/gfs2/trans.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/gfs2/trans.c b/fs/gfs2/trans.c index 7705f04621f4..ae040b570868 100644 --- a/fs/gfs2/trans.c +++ b/fs/gfs2/trans.c @@ -98,10 +98,9 @@ void gfs2_trans_end(struct gfs2_sbd *sdp) if (!test_bit(TR_TOUCHED, &tr->tr_flags)) { gfs2_log_release(sdp, tr->tr_reserved); - if (alloced) { + if (alloced) gfs2_trans_free(sdp, tr); - sb_end_intwrite(sdp->sd_vfs); - } + sb_end_intwrite(sdp->sd_vfs); return; } @@ -121,8 +120,7 @@ void gfs2_trans_end(struct gfs2_sbd *sdp) if (sdp->sd_vfs->s_flags & SB_SYNCHRONOUS) gfs2_log_flush(sdp, NULL, GFS2_LOG_HEAD_FLUSH_NORMAL | GFS2_LFC_TRANS_END); - if (alloced) - sb_end_intwrite(sdp->sd_vfs); + sb_end_intwrite(sdp->sd_vfs); } static struct gfs2_bufdata *gfs2_alloc_bufdata(struct gfs2_glock *gl, |