diff options
Diffstat (limited to 'fs/gfs2/trans.c')
-rw-r--r-- | fs/gfs2/trans.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/gfs2/trans.c b/fs/gfs2/trans.c index 88162fa..3bb4ac7 100644 --- a/fs/gfs2/trans.c +++ b/fs/gfs2/trans.c @@ -135,8 +135,10 @@ void gfs2_trans_end(struct gfs2_sbd *sdp) if (tr->tr_t_gh.gh_gl) { gfs2_glock_dq(&tr->tr_t_gh); gfs2_holder_uninit(&tr->tr_t_gh); - kfree(tr); + if (!tr->tr_attached) + kfree(tr); } + up_read(&sdp->sd_log_flush_lock); if (sdp->sd_vfs->s_flags & MS_SYNCHRONOUS) gfs2_log_flush(sdp, NULL); |