Lines Matching refs:txb
22 struct rxrpc_txbuf *txb; in rxrpc_alloc_data_txbuf() local
26 txb = kzalloc(sizeof(*txb), gfp); in rxrpc_alloc_data_txbuf()
27 if (!txb) in rxrpc_alloc_data_txbuf()
42 kfree(txb); in rxrpc_alloc_data_txbuf()
46 refcount_set(&txb->ref, 1); in rxrpc_alloc_data_txbuf()
47 txb->call_debug_id = call->debug_id; in rxrpc_alloc_data_txbuf()
48 txb->debug_id = atomic_inc_return(&rxrpc_txbuf_debug_ids); in rxrpc_alloc_data_txbuf()
49 txb->alloc_size = data_size; in rxrpc_alloc_data_txbuf()
50 txb->space = data_size; in rxrpc_alloc_data_txbuf()
51 txb->offset = 0; in rxrpc_alloc_data_txbuf()
52 txb->flags = call->conn->out_clientflag; in rxrpc_alloc_data_txbuf()
53 txb->seq = call->send_top + 1; in rxrpc_alloc_data_txbuf()
54 txb->data = buf + doff; in rxrpc_alloc_data_txbuf()
56 trace_rxrpc_txbuf(txb->debug_id, txb->call_debug_id, txb->seq, 1, in rxrpc_alloc_data_txbuf()
60 return txb; in rxrpc_alloc_data_txbuf()
63 void rxrpc_see_txbuf(struct rxrpc_txbuf *txb, enum rxrpc_txbuf_trace what) in rxrpc_see_txbuf() argument
65 int r = refcount_read(&txb->ref); in rxrpc_see_txbuf()
67 trace_rxrpc_txbuf(txb->debug_id, txb->call_debug_id, txb->seq, r, what); in rxrpc_see_txbuf()
70 static void rxrpc_free_txbuf(struct rxrpc_txbuf *txb) in rxrpc_free_txbuf() argument
72 trace_rxrpc_txbuf(txb->debug_id, txb->call_debug_id, txb->seq, 0, in rxrpc_free_txbuf()
74 if (txb->data) in rxrpc_free_txbuf()
75 page_frag_free(txb->data); in rxrpc_free_txbuf()
76 kfree(txb); in rxrpc_free_txbuf()
80 void rxrpc_put_txbuf(struct rxrpc_txbuf *txb, enum rxrpc_txbuf_trace what) in rxrpc_put_txbuf() argument
87 if (txb) { in rxrpc_put_txbuf()
88 debug_id = txb->debug_id; in rxrpc_put_txbuf()
89 call_debug_id = txb->call_debug_id; in rxrpc_put_txbuf()
90 seq = txb->seq; in rxrpc_put_txbuf()
91 dead = __refcount_dec_and_test(&txb->ref, &r); in rxrpc_put_txbuf()
94 rxrpc_free_txbuf(txb); in rxrpc_put_txbuf()