summaryrefslogtreecommitdiff
path: root/fs/gfs2/log.c
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruenba@redhat.com>2021-01-29 18:45:33 +0300
committerAndreas Gruenbacher <agruenba@redhat.com>2021-02-03 20:37:10 +0300
commitc968f5788bc91fe4f86df1a68f0d6471396b4d78 (patch)
treed41b5169df48d784f6aded7065c0bd451dbd6b59 /fs/gfs2/log.c
parent15e20a301ab06575482c7ab3b442a6830cec928e (diff)
downloadlinux-c968f5788bc91fe4f86df1a68f0d6471396b4d78.tar.xz
gfs2: Clean up on-stack transactions
Replace the TR_ALLOCED flag by its inverse, TR_ONSTACK: that way, the flag only needs to be set in the exceptional case of on-stack transactions. Split off __gfs2_trans_begin from gfs2_trans_begin and use it to replace the open-coded version in gfs2_ail_empty_gl. Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Diffstat (limited to 'fs/gfs2/log.c')
-rw-r--r--fs/gfs2/log.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/gfs2/log.c b/fs/gfs2/log.c
index e4dc23a24569..0fceb60907a2 100644
--- a/fs/gfs2/log.c
+++ b/fs/gfs2/log.c
@@ -1114,7 +1114,7 @@ static void log_refund(struct gfs2_sbd *sdp, struct gfs2_trans *tr)
if (sdp->sd_log_tr) {
gfs2_merge_trans(sdp, tr);
} else if (tr->tr_num_buf_new || tr->tr_num_databuf_new) {
- gfs2_assert_withdraw(sdp, test_bit(TR_ALLOCED, &tr->tr_flags));
+ gfs2_assert_withdraw(sdp, !test_bit(TR_ONSTACK, &tr->tr_flags));
sdp->sd_log_tr = tr;
set_bit(TR_ATTACHED, &tr->tr_flags);
}