aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/trans.c
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2006-03-01 17:41:58 -0500
committerSteven Whitehouse <swhiteho@redhat.com>2006-03-01 17:41:58 -0500
commitb4dc72911d149d7d6b7ffb512bd68906f1cbd33a (patch)
tree2b00b45b2c63eac9b3aa3b353f1ba44b9a14582d /fs/gfs2/trans.c
parentc9fd43078f5007c6ca6b3a9cd04c51a8f0e44a20 (diff)
downloadkernel_samsung_smdk4412-b4dc72911d149d7d6b7ffb512bd68906f1cbd33a.zip
kernel_samsung_smdk4412-b4dc72911d149d7d6b7ffb512bd68906f1cbd33a.tar.gz
kernel_samsung_smdk4412-b4dc72911d149d7d6b7ffb512bd68906f1cbd33a.tar.bz2
[GFS2] Fix some bugs
Fix a bug I introduced earlier with a kfree() and usage of a structure in the wrong order. Also try and get the counts of the journaled data buffers "more correct". Still some work to do in this area though. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/trans.c')
-rw-r--r--fs/gfs2/trans.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/fs/gfs2/trans.c b/fs/gfs2/trans.c
index 5d1f4a1..63e7fed 100644
--- a/fs/gfs2/trans.c
+++ b/fs/gfs2/trans.c
@@ -87,7 +87,6 @@ int gfs2_trans_begin_i(struct gfs2_sbd *sdp, unsigned int blocks,
void gfs2_trans_end(struct gfs2_sbd *sdp)
{
struct gfs2_trans *tr;
- struct gfs2_holder *t_gh;
tr = current->journal_info;
current->journal_info = NULL;
@@ -95,13 +94,11 @@ void gfs2_trans_end(struct gfs2_sbd *sdp)
if (gfs2_assert_warn(sdp, tr))
return;
- t_gh = &tr->tr_t_gh;
-
if (!tr->tr_touched) {
gfs2_log_release(sdp, tr->tr_reserved);
- gfs2_glock_dq(t_gh);
- gfs2_holder_uninit(t_gh);
+ gfs2_glock_dq(&tr->tr_t_gh);
+ gfs2_holder_uninit(&tr->tr_t_gh);
kfree(tr);
return;
@@ -120,8 +117,10 @@ void gfs2_trans_end(struct gfs2_sbd *sdp)
gfs2_log_commit(sdp, tr);
- gfs2_glock_dq(t_gh);
- gfs2_holder_uninit(t_gh);
+ gfs2_glock_dq(&tr->tr_t_gh);
+ gfs2_holder_uninit(&tr->tr_t_gh);
+
+ kfree(tr);
if (sdp->sd_vfs->s_flags & MS_SYNCHRONOUS)
gfs2_log_flush(sdp);