Lines Matching refs:tr
31 struct gfs2_trans *tr;
40 tr = kzalloc(sizeof(struct gfs2_trans), GFP_NOFS);
41 if (!tr)
44 tr->tr_ip = (unsigned long)__builtin_return_address(0);
45 tr->tr_blocks = blocks;
46 tr->tr_revokes = revokes;
47 tr->tr_reserved = 1;
49 tr->tr_reserved += 6 + blocks;
51 tr->tr_reserved += gfs2_struct2blk(sdp, revokes,
53 INIT_LIST_HEAD(&tr->tr_list_buf);
55 gfs2_holder_init(sdp->sd_trans_gl, LM_ST_SHARED, 0, &tr->tr_t_gh);
57 error = gfs2_glock_nq(&tr->tr_t_gh);
61 error = gfs2_log_reserve(sdp, tr->tr_reserved);
65 current->journal_info = tr;
70 gfs2_glock_dq(&tr->tr_t_gh);
73 gfs2_holder_uninit(&tr->tr_t_gh);
74 kfree(tr);
98 struct gfs2_trans *tr = current->journal_info;
100 BUG_ON(!tr);
103 if (!tr->tr_touched) {
104 gfs2_log_release(sdp, tr->tr_reserved);
105 if (tr->tr_t_gh.gh_gl) {
106 gfs2_glock_dq(&tr->tr_t_gh);
107 gfs2_holder_uninit(&tr->tr_t_gh);
108 kfree(tr);
113 if (gfs2_assert_withdraw(sdp, tr->tr_num_buf <= tr->tr_blocks)) {
115 tr->tr_num_buf, tr->tr_blocks);
116 print_symbol(KERN_WARNING "GFS2: Transaction created at: %s\n", tr->tr_ip);
118 if (gfs2_assert_withdraw(sdp, tr->tr_num_revoke <= tr->tr_revokes)) {
120 tr->tr_num_revoke, tr->tr_revokes);
121 print_symbol(KERN_WARNING "GFS2: Transaction created at: %s\n", tr->tr_ip);
124 gfs2_log_commit(sdp, tr);
125 if (tr->tr_t_gh.gh_gl) {
126 gfs2_glock_dq(&tr->tr_t_gh);
127 gfs2_holder_uninit(&tr->tr_t_gh);
128 kfree(tr);
170 struct gfs2_trans *tr = current->journal_info;
180 tr->tr_num_revoke_rm++;