diff options
Diffstat (limited to 'fs/gfs2/trans.c')
-rw-r--r-- | fs/gfs2/trans.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/fs/gfs2/trans.c b/fs/gfs2/trans.c index 4ef0e9fa3549..9ec73a854111 100644 --- a/fs/gfs2/trans.c +++ b/fs/gfs2/trans.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include "meta_io.h" | 23 | #include "meta_io.h" |
24 | #include "trans.h" | 24 | #include "trans.h" |
25 | #include "util.h" | 25 | #include "util.h" |
26 | #include "trace_gfs2.h" | ||
26 | 27 | ||
27 | int gfs2_trans_begin(struct gfs2_sbd *sdp, unsigned int blocks, | 28 | int gfs2_trans_begin(struct gfs2_sbd *sdp, unsigned int blocks, |
28 | unsigned int revokes) | 29 | unsigned int revokes) |
@@ -75,6 +76,23 @@ fail_holder_uninit: | |||
75 | return error; | 76 | return error; |
76 | } | 77 | } |
77 | 78 | ||
79 | /** | ||
80 | * gfs2_log_release - Release a given number of log blocks | ||
81 | * @sdp: The GFS2 superblock | ||
82 | * @blks: The number of blocks | ||
83 | * | ||
84 | */ | ||
85 | |||
86 | static void gfs2_log_release(struct gfs2_sbd *sdp, unsigned int blks) | ||
87 | { | ||
88 | |||
89 | atomic_add(blks, &sdp->sd_log_blks_free); | ||
90 | trace_gfs2_log_blocks(sdp, blks); | ||
91 | gfs2_assert_withdraw(sdp, atomic_read(&sdp->sd_log_blks_free) <= | ||
92 | sdp->sd_jdesc->jd_blocks); | ||
93 | up_read(&sdp->sd_log_flush_lock); | ||
94 | } | ||
95 | |||
78 | void gfs2_trans_end(struct gfs2_sbd *sdp) | 96 | void gfs2_trans_end(struct gfs2_sbd *sdp) |
79 | { | 97 | { |
80 | struct gfs2_trans *tr = current->journal_info; | 98 | struct gfs2_trans *tr = current->journal_info; |