summaryrefslogtreecommitdiff
path: root/fs/gfs2/trans.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-11-15 03:01:02 +0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-11-15 03:01:02 +0400
commitecdca043ebe8e3172e0400d0966831e2e60870a0 (patch)
treec1433e2399f544970e1f9ae7a469dbc9172c8e9f /fs/gfs2/trans.c
parentbb3215e97bb1ab917ed858322a9399fb32e69e49 (diff)
parent77b67063bb6bce6d475e910d3b886a606d0d91f7 (diff)
downloadlinux-ecdca043ebe8e3172e0400d0966831e2e60870a0.tar.xz
Merge 3.7-rc5 into driver-core-next
Diffstat (limited to 'fs/gfs2/trans.c')
-rw-r--r--fs/gfs2/trans.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/gfs2/trans.c b/fs/gfs2/trans.c
index adbd27875ef9..413627072f36 100644
--- a/fs/gfs2/trans.c
+++ b/fs/gfs2/trans.c
@@ -155,14 +155,22 @@ void gfs2_trans_add_bh(struct gfs2_glock *gl, struct buffer_head *bh, int meta)
struct gfs2_sbd *sdp = gl->gl_sbd;
struct gfs2_bufdata *bd;
+ lock_buffer(bh);
+ gfs2_log_lock(sdp);
bd = bh->b_private;
if (bd)
gfs2_assert(sdp, bd->bd_gl == gl);
else {
+ gfs2_log_unlock(sdp);
+ unlock_buffer(bh);
gfs2_attach_bufdata(gl, bh, meta);
bd = bh->b_private;
+ lock_buffer(bh);
+ gfs2_log_lock(sdp);
}
lops_add(sdp, bd);
+ gfs2_log_unlock(sdp);
+ unlock_buffer(bh);
}
void gfs2_trans_add_revoke(struct gfs2_sbd *sdp, struct gfs2_bufdata *bd)