/linux/Documentation/translations/zh_CN/core-api/ |
A D | kref.rst | 41 struct kref refcount; 58 kref_init(&data->refcount); 60 这将kref中的refcount设置为1。 68 行线程,你必须在传递之前用kref_get()增加refcount:: 70 kref_get(&data->refcount); 112 kref_init(&data->refcount); 114 kref_get(&data->refcount); 145 kref_get(&data->refcount); 176 struct kref refcount; 186 kref_get(&entry->refcount); [all …]
|
/linux/drivers/gpu/drm/amd/display/dc/core/ |
A D | dc_surface.c | 112 kref_init(&plane_state->refcount); in dc_create_plane_state() 177 kref_get(&plane_state->refcount); in dc_plane_state_retain() 194 kref_get(&gamma->refcount); in dc_gamma_retain() 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() 236 kref_put(&tf->refcount, dc_transfer_func_free); in dc_transfer_func_release() 246 kref_init(&tf->refcount); in dc_create_transfer_func() 268 kref_init(&lut->refcount); in dc_create_3dlut_func() 280 kref_put(&lut->refcount, dc_3dlut_func_free); in dc_3dlut_func_release() [all …]
|
A D | dc_sink.c | 72 kref_get(&sink->refcount); in dc_sink_retain() 77 struct dc_sink *sink = container_of(kref, struct dc_sink, refcount); in dc_sink_free() 84 kref_put(&sink->refcount, dc_sink_free); in dc_sink_release() 97 kref_init(&sink->refcount); in dc_sink_create()
|
/linux/include/linux/ |
A D | kref.h | 20 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()
|
/linux/include/trace/events/ |
A D | objagg.h | 88 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)
|
/linux/drivers/scsi/qedf/ |
A D | qedf_els.c | 196 int refcount; in qedf_rrq_compl() local 211 refcount = kref_read(&orig_io_req->refcount); in qedf_rrq_compl() 221 if (orig_io_req && refcount > 0) in qedf_rrq_compl() 248 int refcount; in qedf_send_rrq() local 258 refcount = kref_read(&aborted_io_req->refcount); in qedf_send_rrq() 283 refcount = kref_read(&aborted_io_req->refcount); in qedf_send_rrq() 284 if (refcount != 1) { in qedf_send_rrq() 549 int refcount; in qedf_srr_compl() local 569 refcount = kref_read(&orig_io_req->refcount); in qedf_srr_compl() 844 int refcount; in qedf_rec_compl() local [all …]
|
A D | qedf_io.c | 825 io_log->refcount = kref_read(&io_req->refcount); in qedf_trace_io() 1125 int refcount; in qedf_scsi_completion() local 1229 refcount = kref_read(&io_req->refcount); in qedf_scsi_completion() 1239 refcount); in qedf_scsi_completion() 1325 int refcount; in qedf_scsi_done() local 1392 refcount = kref_read(&io_req->refcount); in qedf_scsi_done() 1400 refcount); in qedf_scsi_done() 1679 refcount = kref_read(&io_req->refcount); in qedf_flush_active_ios() 1822 refcount = in qedf_flush_active_ios() 1930 refcount = kref_read(&io_req->refcount); in qedf_initiate_abts() [all …]
|
/linux/Documentation/core-api/ |
A D | kref.rst | 28 struct kref refcount; 46 kref_init(&data->refcount); 48 This sets the refcount in the kref to 1. 60 kref_get(&data->refcount); 95 kref_put(&data->refcount, data_release); 106 kref_init(&data->refcount); 108 kref_get(&data->refcount); 144 kref_get(&data->refcount); 180 struct kref refcount; 190 kref_get(&entry->refcount); [all …]
|
/linux/fs/xfs/scrub/ |
A D | refcount.c | 78 xfs_nlink_t refcount; member 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 340 xfs_nlink_t refcount; in xchk_refcountbt_rec() local 345 refcount = be32_to_cpu(rec->refc.rc_refcount); in xchk_refcountbt_rec() 349 if ((refcount == 1 && !has_cowflag) || (refcount != 1 && has_cowflag)) in xchk_refcountbt_rec() [all …]
|
/linux/net/batman-adv/ |
A D | originator.c | 163 kref_init(&vlan->refcount); in batadv_orig_node_vlan_new() 166 kref_get(&vlan->refcount); in batadv_orig_node_vlan_new() 246 refcount); in batadv_hardif_neigh_release() 375 kref_get(&if_outgoing->refcount); in batadv_orig_ifinfo_new() 382 kref_init(&orig_ifinfo->refcount); in batadv_orig_ifinfo_new() 384 kref_get(&orig_ifinfo->refcount); in batadv_orig_ifinfo_new() 532 kref_get(&hard_iface->refcount); in batadv_hardif_neigh_create() 644 kref_get(&hard_iface->refcount); in batadv_neigh_node_create() 655 kref_init(&neigh_node->refcount); in batadv_neigh_node_create() 657 kref_get(&neigh_node->refcount); in batadv_neigh_node_create() [all …]
|
A D | types.h | 190 struct kref refcount; member 274 struct kref refcount; member 344 struct kref refcount; member 497 struct kref refcount; member 572 struct kref refcount; member 631 struct kref refcount; member 666 struct kref refcount; member 735 struct kref refcount; member 1482 struct kref refcount; member 1510 struct kref refcount; member [all …]
|
A D | originator.h | 96 kref_put(&orig_vlan->refcount, batadv_orig_node_vlan_release); in batadv_orig_node_vlan_put() 110 kref_put(&neigh_ifinfo->refcount, batadv_neigh_ifinfo_release); in batadv_neigh_ifinfo_put() 124 kref_put(&hardif_neigh->refcount, batadv_hardif_neigh_release); in batadv_hardif_neigh_put() 137 kref_put(&neigh_node->refcount, batadv_neigh_node_release); in batadv_neigh_node_put() 151 kref_put(&orig_ifinfo->refcount, batadv_orig_ifinfo_release); in batadv_orig_ifinfo_put() 164 kref_put(&orig_node->refcount, batadv_orig_node_release); in batadv_orig_node_put()
|
A D | tvlv.c | 42 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() 545 kref_init(&tvlv_handler->refcount); in batadv_tvlv_handler_register() 548 kref_get(&tvlv_handler->refcount); in batadv_tvlv_handler_register()
|
/linux/mm/ |
A D | zpool.c | 44 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()
|
/linux/arch/arm64/kvm/hyp/nvhe/ |
A D | page_alloc.c | 58 if (!buddy || buddy->order != order || buddy->refcount) in __find_buddy_avail() 149 BUG_ON(p->refcount == USHRT_MAX); in hyp_page_ref_inc() 150 p->refcount++; in hyp_page_ref_inc() 155 BUG_ON(!p->refcount); in hyp_page_ref_dec_and_test() 156 p->refcount--; in hyp_page_ref_dec_and_test() 157 return (p->refcount == 0); in hyp_page_ref_dec_and_test() 162 BUG_ON(p->refcount); in hyp_set_page_refcounted() 163 p->refcount = 1; in hyp_set_page_refcounted()
|
/linux/drivers/net/ethernet/mellanox/mlx5/core/ |
A D | rl.c | 125 if (!table->rl_entry[i].refcount) in find_rl_entry() 130 if (table->rl_entry[i].refcount) { in find_rl_entry() 185 table->refcount++; in mlx5_rl_table_get() 200 table->refcount++; in mlx5_rl_table_get() 207 if (--table->refcount) in mlx5_rl_table_put() 223 if (table->rl_entry[i].refcount) in mlx5_rl_table_free() 230 entry->refcount++; in mlx5_rl_entry_get() 236 entry->refcount--; in mlx5_rl_entry_put() 237 if (!entry->refcount) in mlx5_rl_entry_put() 271 if (!entry->refcount) { in mlx5_rl_add_rate_raw() [all …]
|
/linux/net/core/ |
A D | dev_addr_lists.c | 34 ha->refcount = 1; in __hw_addr_create() 88 ha->refcount++; in __hw_addr_add_ex() 138 if (--ha->refcount) in __hw_addr_del_entry() 217 ha->refcount++; in __hw_addr_sync_one() 247 if (ha->sync_cnt == ha->refcount) { in __hw_addr_sync_multiple() 275 } else if (ha->refcount == 1) in __hw_addr_sync() 340 ha->refcount++; in __hw_addr_sync_dev() 380 ref_cnt = ha->refcount - ha->sync_cnt; in __hw_addr_ref_sync_dev() 384 ha->refcount = (ref_cnt << 1) + 1; in __hw_addr_ref_sync_dev() 400 ha->refcount = ref_cnt << 1; in __hw_addr_ref_sync_dev() [all …]
|
/linux/drivers/media/mc/ |
A D | mc-dev-allocator.c | 33 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()
|
/linux/drivers/net/ethernet/mellanox/mlx5/core/lib/ |
A D | geneve.c | 14 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()
|
/linux/include/net/ |
A D | ax25.h | 163 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() 261 refcount_t refcount; member 283 refcount_inc(&((__ax25)->refcount)) 287 if (refcount_dec_and_test(&ax25->refcount)) { in ax25_cb_put()
|
A D | netrom.h | 99 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()
|
/linux/drivers/net/ethernet/mellanox/mlx5/core/steering/ |
A D | dr_table.c | 73 refcount_dec(&tbl->miss_action->refcount); in mlx5dr_table_set_miss_action() 78 refcount_inc(&action->refcount); in mlx5dr_table_set_miss_action() 250 refcount_inc(&dmn->refcount); in mlx5dr_table_create() 259 refcount_set(&tbl->refcount, 1); in mlx5dr_table_create() 276 refcount_dec(&dmn->refcount); in mlx5dr_table_create() 284 if (refcount_read(&tbl->refcount) > 1) in mlx5dr_table_destroy() 294 refcount_dec(&tbl->miss_action->refcount); in mlx5dr_table_destroy() 296 refcount_dec(&tbl->dmn->refcount); in mlx5dr_table_destroy()
|
/linux/drivers/net/wireguard/ |
A D | peer.c | 53 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()
|
/linux/drivers/tty/vt/ |
A D | consolemap.c | 191 unsigned long refcount; member 428 if (--p->refcount) in con_free_unimap() 464 q->refcount++; in con_unify_unimap() 509 if (!p || --p->refcount) { in con_do_clear_unimap() 513 p->refcount++; in con_do_clear_unimap() 516 q->refcount=1; in con_do_clear_unimap() 520 p->refcount++; in con_do_clear_unimap() 560 if (p->refcount > 1) { in con_set_unimap() 597 p->refcount++; in con_set_unimap() 670 dflt->refcount++; in con_set_default_unimap() [all …]
|
/linux/drivers/gpu/host1x/ |
A D | channel.c | 53 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()
|