aboutsummaryrefslogtreecommitdiff
path: root/fs/gfs2/trans.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-03-26 11:08:47 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-03-26 11:08:47 -0700
commit8ff64b539bfd998792614481ccb67139b97075ef (patch)
tree76bdba9fde912de766112a1e5476eec97850e9c5 /fs/gfs2/trans.c
parent61a9dc26d3d4ef61b0ead9930561c9ce0efa1919 (diff)
parentdf3647b24510e23523f81a77bb179cd9ae3d613b (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-nmw
* git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-nmw: GFS2: Fix freeze issue Fix a minor bug in the previous patch GFS2: Clean up of glops.c GFS2: Fix locking bug in failed shared to exclusive conversion GFS2: Pagecache usage optimization on GFS2 GFS2: fix sparse warning: Should it be static? GFS2: fix sparse warnings: constant is so big it is ... GFS2: Support quota/noquota mount arguments GFS2: Fix alignment issue and tidy gfs2_bitfit GFS2: Add a "demote a glock" interface to sysfs GFS2: Expose UUID via sysfs/uevent GFS2: Support generation of discard requests GFS2: Fix deadlock on journal flush GFS2: Fix error path ref counting for root inode GFS2: Remove unused field from glock GFS2: Merge lock_dlm module into GFS2 GFS2: Remove "double" locking in quota GFS2: change gfs2_quota_scan into a shrinker GFS2: Bring back lvb-related stuff to lock_nolock to support quotas GFS2: Fix remount argument parsing
Diffstat (limited to 'fs/gfs2/trans.c')
-rw-r--r--fs/gfs2/trans.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/fs/gfs2/trans.c b/fs/gfs2/trans.c
index f677b8a83f0..053752d4b27 100644
--- a/fs/gfs2/trans.c
+++ b/fs/gfs2/trans.c
@@ -12,9 +12,8 @@
#include <linux/spinlock.h>
#include <linux/completion.h>
#include <linux/buffer_head.h>
-#include <linux/gfs2_ondisk.h>
#include <linux/kallsyms.h>
-#include <linux/lm_interface.h>
+#include <linux/gfs2_ondisk.h>
#include "gfs2.h"
#include "incore.h"
@@ -88,9 +87,11 @@ void gfs2_trans_end(struct gfs2_sbd *sdp)
if (!tr->tr_touched) {
gfs2_log_release(sdp, tr->tr_reserved);
- gfs2_glock_dq(&tr->tr_t_gh);
- gfs2_holder_uninit(&tr->tr_t_gh);
- kfree(tr);
+ if (tr->tr_t_gh.gh_gl) {
+ gfs2_glock_dq(&tr->tr_t_gh);
+ gfs2_holder_uninit(&tr->tr_t_gh);
+ kfree(tr);
+ }
return;
}
@@ -106,9 +107,11 @@ void gfs2_trans_end(struct gfs2_sbd *sdp)
}
gfs2_log_commit(sdp, tr);
- gfs2_glock_dq(&tr->tr_t_gh);
- gfs2_holder_uninit(&tr->tr_t_gh);
- kfree(tr);
+ if (tr->tr_t_gh.gh_gl) {
+ 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, NULL);