summaryrefslogtreecommitdiff
path: root/fs/gfs2/trans.h
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruenba@redhat.com>2021-01-29 16:45:33 +0100
committerAndreas Gruenbacher <agruenba@redhat.com>2021-02-03 18:37:10 +0100
commitc968f5788bc91fe4f86df1a68f0d6471396b4d78 (patch)
treed41b5169df48d784f6aded7065c0bd451dbd6b59 /fs/gfs2/trans.h
parent15e20a301ab06575482c7ab3b442a6830cec928e (diff)
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/trans.h')
-rw-r--r--fs/gfs2/trans.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/gfs2/trans.h b/fs/gfs2/trans.h
index 83199ce5a5c5..55f253015cf8 100644
--- a/fs/gfs2/trans.h
+++ b/fs/gfs2/trans.h
@@ -34,6 +34,9 @@ static inline unsigned int gfs2_rg_blocks(const struct gfs2_inode *ip, unsigned
return rgd->rd_length;
}
+extern int __gfs2_trans_begin(struct gfs2_trans *tr, struct gfs2_sbd *sdp,
+ unsigned int blocks, unsigned int revokes,
+ unsigned long ip);
extern int gfs2_trans_begin(struct gfs2_sbd *sdp, unsigned int blocks,
unsigned int revokes);