diff options
Diffstat (limited to 'fs/gfs2/trans.c')
-rw-r--r-- | fs/gfs2/trans.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/fs/gfs2/trans.c b/fs/gfs2/trans.c index 061f4a9a1db4..6b02d8c38f0f 100644 --- a/fs/gfs2/trans.c +++ b/fs/gfs2/trans.c | |||
@@ -44,7 +44,7 @@ int gfs2_trans_begin(struct gfs2_sbd *sdp, unsigned int blocks, | |||
44 | tr->tr_revokes = revokes; | 44 | tr->tr_revokes = revokes; |
45 | tr->tr_reserved = 1; | 45 | tr->tr_reserved = 1; |
46 | if (blocks) | 46 | if (blocks) |
47 | tr->tr_reserved += 1 + blocks; | 47 | tr->tr_reserved += 6 + blocks; |
48 | if (revokes) | 48 | if (revokes) |
49 | tr->tr_reserved += gfs2_struct2blk(sdp, revokes, | 49 | tr->tr_reserved += gfs2_struct2blk(sdp, revokes, |
50 | sizeof(uint64_t)); | 50 | sizeof(uint64_t)); |
@@ -83,20 +83,15 @@ fail_holder_uninit: | |||
83 | 83 | ||
84 | void gfs2_trans_end(struct gfs2_sbd *sdp) | 84 | void gfs2_trans_end(struct gfs2_sbd *sdp) |
85 | { | 85 | { |
86 | struct gfs2_trans *tr; | 86 | struct gfs2_trans *tr = current->journal_info; |
87 | 87 | ||
88 | tr = current->journal_info; | 88 | BUG_ON(!tr); |
89 | current->journal_info = NULL; | 89 | current->journal_info = NULL; |
90 | 90 | ||
91 | if (gfs2_assert_warn(sdp, tr)) | ||
92 | return; | ||
93 | |||
94 | if (!tr->tr_touched) { | 91 | if (!tr->tr_touched) { |
95 | gfs2_log_release(sdp, tr->tr_reserved); | 92 | gfs2_log_release(sdp, tr->tr_reserved); |
96 | |||
97 | gfs2_glock_dq(&tr->tr_t_gh); | 93 | gfs2_glock_dq(&tr->tr_t_gh); |
98 | gfs2_holder_uninit(&tr->tr_t_gh); | 94 | gfs2_holder_uninit(&tr->tr_t_gh); |
99 | |||
100 | kfree(tr); | 95 | kfree(tr); |
101 | return; | 96 | return; |
102 | } | 97 | } |
@@ -113,10 +108,8 @@ void gfs2_trans_end(struct gfs2_sbd *sdp) | |||
113 | } | 108 | } |
114 | 109 | ||
115 | gfs2_log_commit(sdp, tr); | 110 | gfs2_log_commit(sdp, tr); |
116 | |||
117 | gfs2_glock_dq(&tr->tr_t_gh); | 111 | gfs2_glock_dq(&tr->tr_t_gh); |
118 | gfs2_holder_uninit(&tr->tr_t_gh); | 112 | gfs2_holder_uninit(&tr->tr_t_gh); |
119 | |||
120 | kfree(tr); | 113 | kfree(tr); |
121 | 114 | ||
122 | if (sdp->sd_vfs->s_flags & MS_SYNCHRONOUS) | 115 | if (sdp->sd_vfs->s_flags & MS_SYNCHRONOUS) |