diff --git a/fs/gfs2/trans.c b/fs/gfs2/trans.c index 192213c7359a..8d169b389dc1 100644 --- a/fs/gfs2/trans.c +++ b/fs/gfs2/trans.c @@ -202,16 +202,8 @@ void gfs2_trans_add_data(struct gfs2_glock *gl, struct buffer_head *bh) } gfs2_log_lock(sdp); bd = bh->b_private; - if (bd == NULL) { - gfs2_log_unlock(sdp); - unlock_buffer(bh); - if (bh->b_private == NULL) - bd = gfs2_alloc_bufdata(gl, bh); - else - bd = bh->b_private; - lock_buffer(bh); - gfs2_log_lock(sdp); - } + if (bd == NULL) + bd = gfs2_alloc_bufdata(gl, bh); gfs2_assert(sdp, bd->bd_gl == gl); set_bit(TR_TOUCHED, &tr->tr_flags); if (list_empty(&bd->bd_list)) {