Home
last modified time | relevance | path

Searched refs:refcount (Results 1 – 25 of 498) sorted by relevance

12345678910>>...20

/kernel/linux/linux-5.10/include/linux/
Dkref.h20 refcount_t refcount; member
23 #define KREF_INIT(n) { .refcount = REFCOUNT_INIT(n), }
31 refcount_set(&kref->refcount, 1); in kref_init()
36 return refcount_read(&kref->refcount); in kref_read()
45 refcount_inc(&kref->refcount); in kref_get()
64 if (refcount_dec_and_test(&kref->refcount)) { in kref_put()
75 if (refcount_dec_and_mutex_lock(&kref->refcount, lock)) { in kref_put_mutex()
86 if (refcount_dec_and_lock(&kref->refcount, lock)) { in kref_put_lock()
111 return refcount_inc_not_zero(&kref->refcount); in kref_get_unless_zero()
/kernel/linux/linux-5.10/drivers/gpu/drm/msm/disp/dpu1/
Ddpu_hw_blk.c32 atomic_set(&hw_blk->refcount, 0); in dpu_hw_blk_init()
54 if (atomic_read(&hw_blk->refcount)) in dpu_hw_blk_destroy()
73 int rc, refcount; in dpu_hw_blk_get() local
81 atomic_read(&curr->refcount))) in dpu_hw_blk_get()
95 refcount = atomic_inc_return(&hw_blk->refcount); in dpu_hw_blk_get()
97 if (refcount == 1 && hw_blk->ops.start) { in dpu_hw_blk_get()
106 hw_blk->id, refcount); in dpu_hw_blk_get()
127 atomic_read(&hw_blk->refcount)); in dpu_hw_blk_put()
129 if (!atomic_read(&hw_blk->refcount)) { in dpu_hw_blk_put()
134 if (atomic_dec_return(&hw_blk->refcount)) in dpu_hw_blk_put()
/kernel/linux/linux-5.10/drivers/gpu/drm/amd/display/dc/core/
Ddc_surface.c112 kref_init(&plane_state->refcount); in dc_create_plane_state()
177 kref_get(&plane_state->refcount); in dc_plane_state_retain()
182 struct dc_plane_state *plane_state = container_of(kref, struct dc_plane_state, refcount); in dc_plane_state_free()
189 kref_put(&plane_state->refcount, dc_plane_state_free); in dc_plane_state_release()
194 kref_get(&gamma->refcount); in dc_gamma_retain()
199 struct dc_gamma *gamma = container_of(kref, struct dc_gamma, refcount); in dc_gamma_free()
205 kref_put(&(*gamma)->refcount, dc_gamma_free); in dc_gamma_release()
216 kref_init(&gamma->refcount); in dc_create_gamma()
225 kref_get(&tf->refcount); in dc_transfer_func_retain()
230 struct dc_transfer_func *tf = container_of(kref, struct dc_transfer_func, refcount); in dc_transfer_func_free()
[all …]
Ddc_sink.c73 kref_get(&sink->refcount); in dc_sink_retain()
78 struct dc_sink *sink = container_of(kref, struct dc_sink, refcount); in dc_sink_free()
85 kref_put(&sink->refcount, dc_sink_free); in dc_sink_release()
98 kref_init(&sink->refcount); in dc_sink_create()
/kernel/linux/linux-5.10/include/trace/events/
Dobjagg.h88 unsigned int refcount),
90 TP_ARGS(objagg, obj, refcount),
95 __field(unsigned int, refcount)
101 __entry->refcount = refcount;
105 __entry->objagg, __entry->obj, __entry->refcount)
111 unsigned int refcount),
113 TP_ARGS(objagg, obj, refcount),
118 __field(unsigned int, refcount)
124 __entry->refcount = refcount;
128 __entry->objagg, __entry->obj, __entry->refcount)
/kernel/linux/linux-5.10/drivers/scsi/qedf/
Dqedf_els.c84 kref_put(&els_req->refcount, qedf_release_cmd); in qedf_initiate_els()
97 kref_put(&els_req->refcount, qedf_release_cmd); in qedf_initiate_els()
188 kref_put(&els_req->refcount, qedf_release_cmd); in qedf_process_els_compl()
196 int refcount; in qedf_rrq_compl() local
211 refcount = kref_read(&orig_io_req->refcount); in qedf_rrq_compl()
214 orig_io_req, orig_io_req->xid, rrq_req->xid, refcount); in qedf_rrq_compl()
221 if (orig_io_req && refcount > 0) in qedf_rrq_compl()
222 kref_put(&orig_io_req->refcount, qedf_release_cmd); in qedf_rrq_compl()
232 kref_put(&rrq_req->refcount, qedf_release_cmd); in qedf_rrq_compl()
248 int refcount; in qedf_send_rrq() local
[all …]
Dqedf_io.c59 kref_put(&io_req->refcount, qedf_release_cmd); in qedf_cmd_timeout()
80 kref_get(&io_req->refcount); in qedf_cmd_timeout()
95 kref_put(&io_req->refcount, qedf_release_cmd); in qedf_cmd_timeout()
380 kref_init(&io_req->refcount); /* ID: 001 */ in qedf_alloc_cmd()
388 kref_put(&io_req->refcount, qedf_release_cmd); in qedf_alloc_cmd()
440 container_of(ref, struct qedf_ioreq, refcount); in qedf_release_cmd()
830 io_log->refcount = kref_read(&io_req->refcount); in qedf_trace_io()
889 kref_put(&io_req->refcount, qedf_release_cmd); in qedf_post_io_req()
898 kref_put(&io_req->refcount, qedf_release_cmd); in qedf_post_io_req()
917 kref_put(&io_req->refcount, qedf_release_cmd); in qedf_post_io_req()
[all …]
/kernel/linux/linux-5.10/Documentation/core-api/
Dkref.rst28 struct kref refcount;
46 kref_init(&data->refcount);
48 This sets the refcount in the kref to 1.
58 increment the refcount with kref_get() before passing it off::
60 kref_get(&data->refcount);
63 refcount cannot go to zero) you may do this without a lock.
67 kref_put(&data->refcount, data_release);
85 struct my_data *data = container_of(ref, struct my_data, refcount);
95 kref_put(&data->refcount, data_release);
106 kref_init(&data->refcount);
[all …]
/kernel/linux/linux-5.10/fs/xfs/scrub/
Drefcount.c78 xfs_nlink_t refcount; member
110 if (refchk->refcount == 1 && rec->rm_owner != XFS_RMAP_OWN_COW) { in xchk_refcountbt_rmap_check()
159 target_nr = refchk->refcount - refchk->seen; in xchk_refcountbt_process_rmap_fragments()
253 refchk->seen = refchk->refcount; in xchk_refcountbt_process_rmap_fragments()
272 xfs_nlink_t refcount) in xchk_refcountbt_xref_rmap() argument
278 .refcount = refcount, in xchk_refcountbt_xref_rmap()
303 if (refcount != refchk.seen) in xchk_refcountbt_xref_rmap()
319 xfs_nlink_t refcount) in xchk_refcountbt_xref() argument
326 xchk_refcountbt_xref_rmap(sc, agbno, len, refcount); in xchk_refcountbt_xref()
340 xfs_nlink_t refcount; in xchk_refcountbt_rec() local
[all …]
/kernel/linux/linux-5.10/net/batman-adv/
Dtypes.h194 struct kref refcount; member
284 struct kref refcount; member
354 struct kref refcount; member
507 struct kref refcount; member
582 struct kref refcount; member
641 struct kref refcount; member
676 struct kref refcount; member
745 struct kref refcount; member
1499 struct kref refcount; member
1530 struct kref refcount; member
[all …]
Doriginator.c76 if (!kref_get_unless_zero(&orig_node->refcount)) in batadv_orig_hash_find()
123 if (!kref_get_unless_zero(&tmp->refcount)) in batadv_orig_node_vlan_get()
164 kref_init(&vlan->refcount); in batadv_orig_node_vlan_new()
167 kref_get(&vlan->refcount); in batadv_orig_node_vlan_new()
185 orig_vlan = container_of(ref, struct batadv_orig_node_vlan, refcount); in batadv_orig_node_vlan_release()
229 neigh_ifinfo = container_of(ref, struct batadv_neigh_ifinfo, refcount); in batadv_neigh_ifinfo_release()
247 refcount); in batadv_hardif_neigh_release()
268 neigh_node = container_of(ref, struct batadv_neigh_node, refcount); in batadv_neigh_node_release()
308 if (router && !kref_get_unless_zero(&router->refcount)) in batadv_orig_router_get()
336 if (!kref_get_unless_zero(&tmp->refcount)) in batadv_orig_ifinfo_get()
[all …]
Doriginator.h100 kref_put(&orig_vlan->refcount, batadv_orig_node_vlan_release); in batadv_orig_node_vlan_put()
114 kref_put(&neigh_ifinfo->refcount, batadv_neigh_ifinfo_release); in batadv_neigh_ifinfo_put()
128 kref_put(&hardif_neigh->refcount, batadv_hardif_neigh_release); in batadv_hardif_neigh_put()
141 kref_put(&neigh_node->refcount, batadv_neigh_node_release); in batadv_neigh_node_put()
155 kref_put(&orig_ifinfo->refcount, batadv_orig_ifinfo_release); in batadv_orig_ifinfo_put()
168 kref_put(&orig_node->refcount, batadv_orig_node_release); in batadv_orig_node_put()
Dtvlv.c42 tvlv_handler = container_of(ref, struct batadv_tvlv_handler, refcount); in batadv_tvlv_handler_release()
56 kref_put(&tvlv_handler->refcount, batadv_tvlv_handler_release); in batadv_tvlv_handler_put()
82 if (!kref_get_unless_zero(&tvlv_handler_tmp->refcount)) in batadv_tvlv_handler_get()
101 tvlv = container_of(ref, struct batadv_tvlv_container, refcount); in batadv_tvlv_container_release()
115 kref_put(&tvlv->refcount, batadv_tvlv_container_release); in batadv_tvlv_container_put()
144 kref_get(&tvlv_tmp->refcount); in batadv_tvlv_container_get()
250 kref_init(&tvlv_new->refcount); in batadv_tvlv_container_register()
256 kref_get(&tvlv_new->refcount); in batadv_tvlv_container_register()
546 kref_init(&tvlv_handler->refcount); in batadv_tvlv_handler_register()
549 kref_get(&tvlv_handler->refcount); in batadv_tvlv_handler_register()
/kernel/linux/linux-5.10/mm/
Dzpool.c44 atomic_set(&driver->refcount, 0); in zpool_register_driver()
62 int ret = 0, refcount; in zpool_unregister_driver() local
65 refcount = atomic_read(&driver->refcount); in zpool_unregister_driver()
66 WARN_ON(refcount < 0); in zpool_unregister_driver()
67 if (refcount > 0) in zpool_unregister_driver()
88 atomic_inc(&driver->refcount); in zpool_get_driver()
100 atomic_dec(&driver->refcount); in zpool_put_driver()
/kernel/linux/linux-5.10/include/net/
Dax25.h163 refcount_t refcount; member
172 refcount_inc(&((ax25)->refcount))
176 if (refcount_dec_and_test(&assoc->refcount)) { in ax25_uid_put()
190 refcount_t refcount; member
199 refcount_inc(&ax25_rt->refcount); in ax25_hold_route()
218 if (refcount_dec_and_test(&ax25_rt->refcount)) in ax25_put_route()
239 refcount_t refcount; member
262 refcount_t refcount; member
284 refcount_inc(&((__ax25)->refcount))
288 if (refcount_dec_and_test(&ax25->refcount)) { in ax25_cb_put()
[all …]
Dnetrom.h99 refcount_t refcount; member
115 refcount_t refcount; member
124 refcount_inc(&((__nr_node)->refcount))
128 if (refcount_dec_and_test(&nr_node->refcount)) { in nr_node_put()
134 refcount_inc(&((__nr_neigh)->refcount))
138 if (refcount_dec_and_test(&nr_neigh->refcount)) { in nr_neigh_put()
/kernel/linux/linux-5.10/drivers/net/ethernet/mellanox/mlx5/core/
Drl.c122 if (!table->rl_entry[i].refcount) in find_rl_entry()
127 if (table->rl_entry[i].refcount) { in find_rl_entry()
200 if (entry->refcount) { in mlx5_rl_add_rate_raw()
202 entry->refcount++; in mlx5_rl_add_rate_raw()
220 entry->refcount = 1; in mlx5_rl_add_rate_raw()
238 entry->refcount--; in mlx5_rl_remove_rate_raw()
239 if (!entry->refcount) in mlx5_rl_remove_rate_raw()
284 if (!entry || !entry->refcount) { in mlx5_rl_remove_rate()
290 entry->refcount--; in mlx5_rl_remove_rate()
291 if (!entry->refcount) in mlx5_rl_remove_rate()
[all …]
/kernel/linux/linux-5.10/drivers/media/mc/
Dmc-dev-allocator.c33 struct kref refcount; member
45 container_of(kref, struct media_device_instance, refcount); in media_device_instance_release()
71 kref_get(&mdi->refcount); in __media_device_get()
89 kref_init(&mdi->refcount); in __media_device_get()
133 kref_put(&mdi->refcount, media_device_instance_release); in media_device_delete()
/kernel/linux/linux-5.10/net/core/
Ddev_addr_lists.c35 ha->refcount = 1; in __hw_addr_create_ex()
71 ha->refcount++; in __hw_addr_add_ex()
104 if (--ha->refcount) in __hw_addr_del_entry()
146 ha->refcount++; in __hw_addr_sync_one()
176 if (ha->sync_cnt == ha->refcount) { in __hw_addr_sync_multiple()
204 } else if (ha->refcount == 1) in __hw_addr_sync()
248 if (!ha->sync_cnt || ha->refcount != 1) in __hw_addr_sync_dev()
269 ha->refcount++; in __hw_addr_sync_dev()
305 if ((ha->sync_cnt << 1) <= ha->refcount) in __hw_addr_ref_sync_dev()
309 ref_cnt = ha->refcount - ha->sync_cnt; in __hw_addr_ref_sync_dev()
[all …]
/kernel/linux/linux-5.10/drivers/net/ethernet/mellanox/mlx5/core/lib/
Dgeneve.c14 u32 refcount; member
72 if (geneve->refcount) { in mlx5_geneve_tlv_option_add()
76 geneve->refcount++; in mlx5_geneve_tlv_option_add()
107 geneve->refcount++; in mlx5_geneve_tlv_option_add()
121 if (--geneve->refcount == 0) { in mlx5_geneve_tlv_option_del()
153 if (geneve->refcount) in mlx5_geneve_destroy()
/kernel/linux/linux-5.10/drivers/soc/qcom/
Dsmem_state.c26 struct kref refcount; member
67 kref_get(&state->refcount); in of_node_to_state()
136 struct qcom_smem_state *state = container_of(ref, struct qcom_smem_state, refcount); in qcom_smem_state_release()
150 kref_put(&state->refcount, qcom_smem_state_release); in qcom_smem_state_put()
171 kref_init(&state->refcount); in qcom_smem_state_register()
/kernel/linux/linux-5.10/drivers/gpu/host1x/
Dchannel.c53 kref_get(&channel->refcount); in host1x_channel_get()
72 if (!kref_get_unless_zero(&ch->refcount)) in host1x_channel_get_index()
81 container_of(kref, struct host1x_channel, refcount); in release_channel()
93 kref_put(&channel->refcount, release_channel); in host1x_channel_put()
134 kref_init(&channel->refcount); in host1x_channel_request()
/kernel/linux/linux-5.10/drivers/net/wireguard/
Dpeer.c53 kref_init(&peer->refcount); in wg_peer_create()
76 if (unlikely(!peer || !kref_get_unless_zero(&peer->refcount))) in wg_peer_get_maybe_zero()
201 static void kref_release(struct kref *refcount) in kref_release() argument
203 struct wg_peer *peer = container_of(refcount, struct wg_peer, refcount); in kref_release()
228 kref_put(&peer->refcount, kref_release); in wg_peer_put()
/kernel/linux/linux-5.10/drivers/net/ethernet/mellanox/mlx5/core/steering/
Ddr_table.c76 refcount_dec(&tbl->miss_action->refcount); in mlx5dr_table_set_miss_action()
81 refcount_inc(&action->refcount); in mlx5dr_table_set_miss_action()
253 refcount_inc(&dmn->refcount); in mlx5dr_table_create()
262 refcount_set(&tbl->refcount, 1); in mlx5dr_table_create()
279 refcount_dec(&dmn->refcount); in mlx5dr_table_create()
287 if (refcount_read(&tbl->refcount) > 1) in mlx5dr_table_destroy()
297 refcount_dec(&tbl->miss_action->refcount); in mlx5dr_table_destroy()
299 refcount_dec(&tbl->dmn->refcount); in mlx5dr_table_destroy()
/kernel/linux/linux-5.10/fs/vboxsf/
Dfile.c19 struct kref refcount; member
40 kref_init(&sf_handle->refcount); in vboxsf_create_sf_handle()
121 static void vboxsf_handle_release(struct kref *refcount) in vboxsf_handle_release() argument
124 container_of(refcount, struct vboxsf_handle, refcount); in vboxsf_handle_release()
138 kref_put(&sf_handle->refcount, vboxsf_handle_release); in vboxsf_release_sf_handle()
260 kref_get(&h->refcount); in vboxsf_get_write_handle()
293 kref_put(&sf_handle->refcount, vboxsf_handle_release); in vboxsf_writepage()

12345678910>>...20