Home
last modified time | relevance | path

Searched refs:refcount (Results 1 – 200 of 336) sorted by relevance

12

/linux-4.4.14/include/linux/
Dkref.h24 atomic_t refcount; member
33 atomic_set(&kref->refcount, 1); in kref_init()
46 WARN_ON_ONCE(atomic_inc_return(&kref->refcount) < 2); in kref_get()
72 if (atomic_sub_and_test((int) count, &kref->refcount)) { in kref_sub()
106 if (unlikely(!atomic_add_unless(&kref->refcount, -1, 1))) { in kref_put_mutex()
108 if (unlikely(!atomic_dec_and_test(&kref->refcount))) { in kref_put_mutex()
136 return atomic_add_unless(&kref->refcount, 1, 0); in kref_get_unless_zero()
Diocontext.h98 atomic_long_t refcount; member
130 WARN_ON_ONCE(atomic_long_read(&ioc->refcount) <= 0); in get_io_context_active()
132 atomic_long_inc(&ioc->refcount); in get_io_context_active()
Dfence.h73 struct kref refcount; member
193 kref_get(&fence->refcount); in fence_get()
205 if (kref_get_unless_zero(&fence->refcount)) in fence_get_rcu()
218 kref_put(&fence->refcount, fence_release); in fence_put()
Drmap.h37 atomic_t refcount; member
100 atomic_inc(&anon_vma->refcount); in get_anon_vma()
107 if (atomic_dec_and_test(&anon_vma->refcount)) in put_anon_vma()
Dslab_def.h43 int refcount; member
Dcpu_rmap.h28 struct kref refcount; member
Dslub_def.h77 int refcount; /* Refcount for slab cache destroy */ member
Dzpool.h83 atomic_t refcount; member
Dtty_ldisc.h218 int refcount; member
Drpmsg.h147 struct kref refcount; member
Dcgroup-defs.h156 atomic_t refcount; member
/linux-4.4.14/drivers/gpu/drm/
Ddrm_global.c39 int refcount; member
52 item->refcount = 0; in drm_global_init()
62 BUG_ON(item->refcount != 0); in drm_global_release()
72 if (item->refcount == 0) { in drm_global_item_ref()
85 ++item->refcount; in drm_global_item_ref()
101 BUG_ON(item->refcount == 0); in drm_global_item_unref()
103 if (--item->refcount == 0) { in drm_global_item_unref()
Ddrm_irq.c273 if ((diff > 1) && (atomic_read(&vblank->refcount) > 1 || in drm_update_vblank_count()
277 atomic_read(&vblank->refcount), in drm_update_vblank_count()
352 if (atomic_read(&vblank->refcount) == 0 && vblank->enabled) { in vblank_disable_fn()
1179 atomic_dec(&vblank->refcount); in drm_vblank_enable()
1218 if (atomic_add_return(1, &vblank->refcount) == 1) { in drm_vblank_get()
1222 atomic_dec(&vblank->refcount); in drm_vblank_get()
1267 if (WARN_ON(atomic_read(&vblank->refcount) == 0)) in drm_vblank_put()
1271 if (atomic_dec_and_test(&vblank->refcount)) { in drm_vblank_put()
1388 atomic_inc(&vblank->refcount); in drm_vblank_off()
1452 atomic_inc(&vblank->refcount); in drm_crtc_vblank_reset()
[all …]
Ddrm_crtc.c411 kref_init(&fb->refcount); in drm_framebuffer_init()
443 container_of(kref, struct drm_framebuffer, refcount); in drm_framebuffer_free()
494 if (!kref_get_unless_zero(&fb->refcount)) in drm_framebuffer_lookup()
511 DRM_DEBUG("%p: FB ID: %d (%d)\n", fb, fb->base.id, atomic_read(&fb->refcount.refcount)); in drm_framebuffer_unreference()
512 kref_put(&fb->refcount, drm_framebuffer_free); in drm_framebuffer_unreference()
524 DRM_DEBUG("%p: FB ID: %d (%d)\n", fb, fb->base.id, atomic_read(&fb->refcount.refcount)); in drm_framebuffer_reference()
525 kref_get(&fb->refcount); in drm_framebuffer_reference()
624 if (atomic_read(&fb->refcount.refcount) > 1) { in drm_framebuffer_remove()
3384 if (atomic_read(&fb->refcount.refcount) > 1) { in drm_mode_rmfb()
3577 if (atomic_read(&fb->refcount.refcount) > 1) { in drm_fb_release()
[all …]
Ddrm_info.c206 atomic_read(&obj->refcount.refcount)); in drm_gem_one_name_info()
Ddrm_drv.c98 kref_init(&master->refcount); in drm_master_create()
109 kref_get(&master->refcount); in drm_master_get()
116 struct drm_master *master = container_of(kref, struct drm_master, refcount); in drm_master_destroy()
139 kref_put(&(*master)->refcount, drm_master_destroy); in drm_master_put()
Ddrm_gem_cma_helper.c384 obj->name, obj->refcount.refcount.counter, in drm_gem_cma_describe()
Ddrm_gem.c168 kref_init(&obj->refcount); in drm_gem_private_object_init()
767 container_of(kref, struct drm_gem_object, refcount); in drm_gem_object_free()
888 if (!kref_get_unless_zero(&obj->refcount)) in drm_gem_mmap()
/linux-4.4.14/Documentation/
Dkref.txt13 struct kref refcount;
28 kref_init(&data->refcount);
30 This sets the refcount in the kref to 1.
37 increment the refcount with kref_get() before passing it off:
38 kref_get(&data->refcount);
40 refcount cannot go to zero) you may do this without a lock.
43 kref_put(&data->refcount, data_release);
60 struct my_data *data = container_of(ref, struct my_data, refcount);
70 kref_put(&data->refcount, data_release);
81 kref_init(&data->refcount);
[all …]
Dremoteproc.txt44 this function will just decrement the power refcount and exit,
49 - we're not decrementing the rproc's refcount, only the power refcount.
57 the remote processor's refcount, so always use rproc_put() to
109 rproc's refcount. It doesn't directly free rproc; that would happen
110 only if there are no other references to rproc and its refcount now
134 last refcount should be decremented by calling rproc_put().
/linux-4.4.14/net/batman-adv/
Dtypes.h111 atomic_t refcount; member
138 atomic_t refcount; member
194 atomic_t refcount; member
296 atomic_t refcount; member
339 atomic_t refcount; member
364 atomic_t refcount; member
400 atomic_t refcount; member
722 atomic_t refcount; member
900 atomic_t refcount; member
921 atomic_t refcount; member
[all …]
Doriginator.c78 if (!atomic_inc_not_zero(&tmp->refcount)) in batadv_orig_node_vlan_get()
119 atomic_set(&vlan->refcount, 2); in batadv_orig_node_vlan_new()
137 if (atomic_dec_and_test(&orig_vlan->refcount)) in batadv_orig_node_vlan_free_ref()
186 if (atomic_dec_and_test(&neigh_ifinfo->refcount)) in batadv_neigh_ifinfo_free_ref()
224 if (atomic_dec_and_test(&neigh_node->refcount)) in batadv_neigh_node_free_ref()
254 if (router && !atomic_inc_not_zero(&router->refcount)) in batadv_orig_router_get()
282 if (!atomic_inc_not_zero(&tmp->refcount)) in batadv_orig_ifinfo_get()
322 !atomic_inc_not_zero(&if_outgoing->refcount)) { in batadv_orig_ifinfo_new()
333 atomic_set(&orig_ifinfo->refcount, 2); in batadv_orig_ifinfo_new()
363 if (!atomic_inc_not_zero(&tmp_neigh_ifinfo->refcount)) in batadv_neigh_ifinfo_get()
[all …]
Dgateway_client.c64 if (atomic_dec_and_test(&gw_node->refcount)) { in batadv_gw_node_free_ref()
80 if (!atomic_inc_not_zero(&gw_node->refcount)) in batadv_gw_get_selected_gw_node()
103 if (!atomic_inc_not_zero(&orig_node->refcount)) in batadv_gw_get_selected_orig()
121 if (new_gw_node && !atomic_inc_not_zero(&new_gw_node->refcount)) in batadv_gw_select()
173 if (!atomic_inc_not_zero(&gw_node->refcount)) in batadv_gw_get_best_gw_node()
191 atomic_inc(&curr_gw->refcount); in batadv_gw_get_best_gw_node()
206 atomic_inc(&curr_gw->refcount); in batadv_gw_get_best_gw_node()
426 if (!atomic_inc_not_zero(&orig_node->refcount)) in batadv_gw_node_add()
439 atomic_set(&gw_node->refcount, 1); in batadv_gw_node_add()
472 if (!atomic_inc_not_zero(&gw_node_tmp->refcount)) in batadv_gw_node_get()
Dhard-interface.h74 if (atomic_dec_and_test(&hard_iface->refcount)) in batadv_hardif_free_ref()
88 if (!atomic_inc_not_zero(&hard_iface->refcount)) in batadv_primary_if_get_selected()
Dhard-interface.c66 atomic_inc_not_zero(&hard_iface->refcount)) in batadv_hardif_get_by_netdev()
171 atomic_inc_not_zero(&hard_iface->refcount)) in batadv_hardif_get_active()
205 if (new_hard_iface && !atomic_inc_not_zero(&new_hard_iface->refcount)) in batadv_primary_if_select()
432 if (!atomic_inc_not_zero(&hard_iface->refcount)) in batadv_hardif_enable_interface()
649 atomic_set(&hard_iface->refcount, 2); in batadv_hardif_add_interface()
Drouting.c75 if (curr_router && !atomic_inc_not_zero(&curr_router->refcount)) in _batadv_update_route()
103 if (neigh_node && !atomic_inc_not_zero(&neigh_node->refcount)) in _batadv_update_route()
494 if (!atomic_inc_not_zero(&cand->refcount)) in batadv_find_router()
501 if (!atomic_inc_not_zero(&cand_router->refcount)) { in batadv_find_router()
520 atomic_inc(&cand_router->refcount); in batadv_find_router()
521 atomic_inc(&cand->refcount); in batadv_find_router()
Dmain.c632 if (atomic_dec_and_test(&tvlv_handler->refcount)) in batadv_tvlv_handler_free_ref()
659 if (!atomic_inc_not_zero(&tvlv_handler_tmp->refcount)) in batadv_tvlv_handler_get()
677 if (atomic_dec_and_test(&tvlv->refcount)) in batadv_tvlv_container_free_ref()
705 if (!atomic_inc_not_zero(&tvlv_tmp->refcount)) in batadv_tvlv_container_get()
811 atomic_set(&tvlv_new->refcount, 1); in batadv_tvlv_container_register()
1097 atomic_set(&tvlv_handler->refcount, 1); in batadv_tvlv_handler_register()
Dbridge_loop_avoidance.c125 if (atomic_dec_and_test(&backbone_gw->refcount)) in batadv_backbone_gw_free_ref()
139 if (atomic_dec_and_test(&claim->refcount)) in batadv_claim_free_ref()
172 if (!atomic_inc_not_zero(&claim->refcount)) in batadv_claim_hash_find()
216 if (!atomic_inc_not_zero(&backbone_gw->refcount)) in batadv_backbone_hash_find()
412 atomic_set(&entry->refcount, 2); in batadv_bla_get_backbone_gw()
593 atomic_set(&claim->refcount, 2); in batadv_bla_add_claim()
621 atomic_inc(&backbone_gw->refcount); in batadv_bla_add_claim()
Dmulticast.c451 if (!atomic_inc_not_zero(&tmp_orig_node->refcount)) in batadv_mcast_forw_ipv4_node_get()
478 if (!atomic_inc_not_zero(&tmp_orig_node->refcount)) in batadv_mcast_forw_ipv6_node_get()
529 if (!atomic_inc_not_zero(&tmp_orig_node->refcount)) in batadv_mcast_forw_unsnoop_node_get()
Doriginator.h111 if (!atomic_inc_not_zero(&orig_node->refcount)) in batadv_orig_hash_find()
Dnetwork-coding.c223 if (atomic_dec_and_test(&nc_node->refcount)) in batadv_nc_node_free_ref()
234 if (atomic_dec_and_test(&nc_path->refcount)) in batadv_nc_path_free_ref()
542 if (!atomic_inc_not_zero(&nc_path->refcount)) in batadv_nc_hash_find()
798 if (!atomic_inc_not_zero(&nc_node->refcount)) in batadv_nc_find_nc_node()
842 if (!atomic_inc_not_zero(&orig_neigh_node->refcount)) in batadv_nc_get_nc_node()
849 atomic_set(&nc_node->refcount, 2); in batadv_nc_get_nc_node()
968 atomic_set(&nc_path->refcount, 2); in batadv_nc_get_path()
Ddistributed-arp-table.c71 if (atomic_dec_and_test(&dat_entry->refcount)) in batadv_dat_entry_free_ref()
284 if (!atomic_inc_not_zero(&dat_entry->refcount)) in batadv_dat_entry_hash_find()
329 atomic_set(&dat_entry->refcount, 2); in batadv_dat_entry_add()
530 if (!atomic_inc_not_zero(&orig_node->refcount)) in batadv_choose_next_candidate()
Dtranslation-table.c136 if (!atomic_inc_not_zero(&tt->refcount)) in batadv_tt_hash_find()
200 if (atomic_dec_and_test(&tt_local_entry->common.refcount)) in batadv_tt_local_entry_free_ref()
212 if (atomic_dec_and_test(&tt_global_entry->common.refcount)) { in batadv_tt_global_entry_free_ref()
353 if (!atomic_dec_and_test(&orig_entry->refcount)) in batadv_tt_orig_list_entry_free_ref()
621 atomic_set(&tt_local->common.refcount, 2); in batadv_tt_local_add()
1260 if (!atomic_inc_not_zero(&tmp_orig_entry->refcount)) in batadv_tt_global_orig_entry_find()
1310 atomic_inc(&orig_node->refcount); in batadv_tt_global_orig_entry_add()
1314 atomic_set(&orig_entry->refcount, 2); in batadv_tt_global_orig_entry_add()
1390 atomic_set(&common->refcount, 2); in batadv_tt_global_add()
2072 if (orig_node && !atomic_inc_not_zero(&orig_node->refcount)) in batadv_transtable_search()
Dsoft-interface.c494 if (atomic_dec_and_test(&vlan->refcount)) { in batadv_softif_vlan_free_ref()
521 if (!atomic_inc_not_zero(&vlan_tmp->refcount)) in batadv_softif_vlan_get()
556 atomic_set(&vlan->refcount, 1); in batadv_softif_create_vlan()
/linux-4.4.14/mm/
Dzpool.c41 atomic_set(&driver->refcount, 0); in zpool_register_driver()
59 int ret = 0, refcount; in zpool_unregister_driver() local
62 refcount = atomic_read(&driver->refcount); in zpool_unregister_driver()
63 WARN_ON(refcount < 0); in zpool_unregister_driver()
64 if (refcount > 0) in zpool_unregister_driver()
85 atomic_inc(&driver->refcount); in zpool_get_driver()
97 atomic_dec(&driver->refcount); in zpool_put_driver()
Dzswap.c147 int refcount; member
238 entry->refcount = 1; in zswap_entry_cache_alloc()
319 entry->refcount++; in zswap_entry_get()
328 int refcount = --entry->refcount; in zswap_entry_put() local
330 BUG_ON(refcount < 0); in zswap_entry_put()
331 if (refcount == 0) { in zswap_entry_put()
Dslab_common.c242 if (s->refcount < 0) in slab_unmergeable()
346 s->refcount = 1; in create_cache()
714 s->refcount--; in kmem_cache_destroy()
715 if (s->refcount) in kmem_cache_destroy()
781 s->refcount = -1; /* Exempt from merging for now */ in create_boot_cache()
794 s->refcount = 1; in create_kmalloc_cache()
Drmap.c79 atomic_set(&anon_vma->refcount, 1); in anon_vma_alloc()
94 VM_BUG_ON(atomic_read(&anon_vma->refcount)); in anon_vma_free()
424 atomic_set(&anon_vma->refcount, 0); in anon_vma_ctor()
471 if (!atomic_inc_not_zero(&anon_vma->refcount)) { in page_get_anon_vma()
530 if (!atomic_inc_not_zero(&anon_vma->refcount)) { in page_lock_anon_vma_read()
545 if (atomic_dec_and_test(&anon_vma->refcount)) { in page_lock_anon_vma_read()
1539 if (root != anon_vma && atomic_dec_and_test(&root->refcount)) in __put_anon_vma()
Dmemory_hotplug.c60 int refcount; member
68 .refcount = 0,
86 mem_hotplug.refcount++; in get_online_mems()
97 if (WARN_ON(!mem_hotplug.refcount)) in put_online_mems()
98 mem_hotplug.refcount++; /* try to fix things up */ in put_online_mems()
100 if (!--mem_hotplug.refcount && unlikely(mem_hotplug.active_writer)) in put_online_mems()
114 if (likely(!mem_hotplug.refcount)) in mem_hotplug_begin()
Dslab.h25 int refcount; /* Use counter */ member
/linux-4.4.14/drivers/staging/rdma/ipath/
Dipath_verbs_mcast.c61 atomic_inc(&qp->refcount); in ipath_mcast_qp_alloc()
72 if (atomic_dec_and_test(&qp->refcount)) in ipath_mcast_qp_free()
95 atomic_set(&mcast->refcount, 0); in ipath_mcast_alloc()
140 atomic_inc(&mcast->refcount); in ipath_mcast_find()
223 atomic_inc(&mcast->refcount); in ipath_mcast_add()
342 wait_event(mcast->wait, atomic_read(&mcast->refcount) <= 1); in ipath_multicast_detach()
346 atomic_dec(&mcast->refcount); in ipath_multicast_detach()
347 wait_event(mcast->wait, !atomic_read(&mcast->refcount)); in ipath_multicast_detach()
Dipath_qp.c225 atomic_inc(&qp->refcount); in ipath_alloc_qpn()
255 atomic_dec(&qp->refcount); in ipath_free_qp()
309 atomic_inc(&qp->refcount); in ipath_lookup_qpn()
845 atomic_set(&qp->refcount, 0); in ipath_create_qp()
987 atomic_dec(&qp->refcount); in ipath_destroy_qp()
996 wait_event(qp->wait, !atomic_read(&qp->refcount)); in ipath_destroy_qp()
Dipath_verbs.c662 if (atomic_dec_return(&mcast->refcount) <= 1) in ipath_ib_rcv()
674 if (atomic_dec_and_test(&qp->refcount)) in ipath_ib_rcv()
712 atomic_inc(&qp->refcount); in ipath_ib_timer()
722 atomic_inc(&qp->refcount); in ipath_ib_timer()
775 if (atomic_dec_and_test(&qp->refcount)) in ipath_ib_timer()
788 if (atomic_dec_and_test(&qp->refcount)) in ipath_ib_timer()
1070 if (atomic_dec_and_test(&qp->refcount)) in sdma_complete()
1151 atomic_inc(&qp->refcount); in ipath_verbs_send_dma()
1228 if (atomic_dec_and_test(&qp->refcount)) in ipath_verbs_send_dma()
1489 atomic_inc(&qp->refcount); in ipath_ib_piobufavail()
[all …]
/linux-4.4.14/drivers/staging/rdma/hfi1/
Dverbs_mcast.c68 atomic_inc(&qp->refcount); in mcast_qp_alloc()
79 if (atomic_dec_and_test(&qp->refcount)) in mcast_qp_free()
102 atomic_set(&mcast->refcount, 0); in mcast_alloc()
148 atomic_inc(&mcast->refcount); in hfi1_mcast_find()
230 atomic_inc(&mcast->refcount); in mcast_add()
364 wait_event(mcast->wait, atomic_read(&mcast->refcount) <= 1); in hfi1_multicast_detach()
368 atomic_dec(&mcast->refcount); in hfi1_multicast_detach()
369 wait_event(mcast->wait, !atomic_read(&mcast->refcount)); in hfi1_multicast_detach()
Dkeys.c199 atomic_inc(&mr->refcount); in hfi1_lkey_ok()
220 atomic_inc(&mr->refcount); in hfi1_lkey_ok()
296 atomic_inc(&mr->refcount); in hfi1_rkey_ok()
317 atomic_inc(&mr->refcount); in hfi1_rkey_ok()
Dverbs.h232 atomic_t refcount; member
246 atomic_t refcount; member
321 atomic_t refcount; member
475 atomic_t refcount ____cacheline_aligned_in_smp;
1041 atomic_inc(&mr->refcount); in hfi1_get_mr()
1046 if (unlikely(atomic_dec_and_test(&mr->refcount))) in hfi1_put_mr()
Dqp.c237 atomic_inc(&qp->refcount); in insert_qp()
295 if (atomic_dec_and_test(&qp->refcount)) in remove_qp()
425 atomic_dec(&to_iah(wqe->ud_wr.ah)->refcount); in clear_mr_refs()
482 if (atomic_dec_and_test(&qp->refcount)) in hfi1_error_qp()
567 if (atomic_dec_and_test(&qp->refcount)) in flush_iowait()
733 wait_event(qp->wait, !atomic_read(&qp->refcount)); in hfi1_modify_qp()
1114 atomic_set(&qp->refcount, 0); in hfi1_create_qp()
1267 wait_event(qp->wait, !atomic_read(&qp->refcount)); in hfi1_destroy_qp()
1396 if (atomic_dec_and_test(&qp->refcount)) in hfi1_qp_wakeup()
1436 atomic_inc(&qp->refcount); in iowait_sleep()
[all …]
Dmr.c82 atomic_set(&mr->refcount, 1); in init_mregion()
332 mr, mr->mr.pd, atomic_read(&mr->mr.refcount)); in hfi1_dereg_mr()
443 i = atomic_read(&fmr->mr.refcount); in hfi1_map_phys_fmr()
Dverbs.c458 atomic_inc(&ah->refcount); in post_one_send()
667 if (atomic_dec_return(&mcast->refcount) <= 1) in hfi1_ib_rcv()
752 atomic_inc(&qp->refcount); in __get_txreq()
869 atomic_inc(&qp->refcount); in wait_kmem()
1104 atomic_inc(&qp->refcount); in no_bufs_available()
1747 atomic_set(&ah->refcount, 0); in create_ah()
1784 if (atomic_read(&ah->refcount) != 0) in destroy_ah()
Drc.c1225 atomic_inc(&qp->refcount); in do_rc_ack()
1409 atomic_inc(&qp->refcount); in rdma_seq_err()
1655 atomic_inc(&qp->refcount); in rc_rcv_error()
2342 atomic_inc(&qp->refcount); in hfi1_rc_rcv()
2354 atomic_inc(&qp->refcount); in hfi1_rc_rcv()
2368 atomic_inc(&qp->refcount); in hfi1_rc_rcv()
2426 atomic_inc(&qp->refcount); in hfi1_rc_hdrerr()
/linux-4.4.14/drivers/infiniband/hw/qib/
Dqib_verbs_mcast.c51 atomic_inc(&qp->refcount); in qib_mcast_qp_alloc()
62 if (atomic_dec_and_test(&qp->refcount)) in qib_mcast_qp_free()
85 atomic_set(&mcast->refcount, 0); in qib_mcast_alloc()
131 atomic_inc(&mcast->refcount); in qib_mcast_find()
213 atomic_inc(&mcast->refcount); in qib_mcast_add()
346 wait_event(mcast->wait, atomic_read(&mcast->refcount) <= 1); in qib_multicast_detach()
350 atomic_dec(&mcast->refcount); in qib_multicast_detach()
351 wait_event(mcast->wait, !atomic_read(&mcast->refcount)); in qib_multicast_detach()
Dqib_keys.c175 if (unlikely(!atomic_inc_not_zero(&mr->refcount))) in qib_lkey_ok()
197 if (unlikely(!atomic_inc_not_zero(&mr->refcount))) in qib_lkey_ok()
274 if (unlikely(!atomic_inc_not_zero(&mr->refcount))) in qib_rkey_ok()
296 if (unlikely(!atomic_inc_not_zero(&mr->refcount))) in qib_rkey_ok()
Dqib_verbs.c445 atomic_inc(&to_iah(ud_wr(wr)->ah)->refcount); in qib_post_one_send()
689 if (atomic_dec_return(&mcast->refcount) <= 1) in qib_ib_rcv()
695 &rcd->lookaside_qp->refcount)) in qib_ib_rcv()
733 atomic_inc(&qp->refcount); in mem_timer()
746 if (atomic_dec_and_test(&qp->refcount)) in mem_timer()
1006 if (atomic_dec_and_test(&qp->refcount)) in qib_put_txreq()
1029 atomic_inc(&qp->refcount); in qib_put_txreq()
1039 if (atomic_dec_and_test(&qp->refcount)) in qib_put_txreq()
1072 atomic_inc(&qp->refcount); in qib_verbs_sdma_desc_avail()
1086 if (atomic_dec_and_test(&qp->refcount)) in qib_verbs_sdma_desc_avail()
[all …]
Dqib_verbs.h220 atomic_t refcount; member
234 atomic_t refcount; member
311 atomic_t refcount; member
465 atomic_t refcount ____cacheline_aligned_in_smp;
1067 atomic_inc(&mr->refcount); in qib_get_mr()
1074 if (unlikely(atomic_dec_and_test(&mr->refcount))) in qib_put_mr()
Dqib_driver.c403 &qp->refcount); in qib_rcv_hdrerr()
426 if (atomic_dec_and_test(&qp->refcount)) in qib_rcv_hdrerr()
557 if (atomic_dec_and_test(&rcd->lookaside_qp->refcount)) in qib_kreceive()
584 if (atomic_dec_and_test(&qp->refcount)) in qib_kreceive()
Dqib_qp.c229 atomic_inc(&qp->refcount); in insert_qp()
284 atomic_dec(&qp->refcount); in remove_qp()
350 atomic_inc(&qp->refcount); in qib_lookup_qpn()
358 atomic_inc(&qp->refcount); in qib_lookup_qpn()
440 atomic_dec(&to_iah(wqe->ud_wr.ah)->refcount); in clear_mr_refs()
715 wait_event(qp->wait, !atomic_read(&qp->refcount)); in qib_modify_qp()
1094 atomic_set(&qp->refcount, 0); in qib_create_qp()
1230 wait_event(qp->wait, !atomic_read(&qp->refcount)); in qib_destroy_qp()
Dqib_user_sdma.c62 int refcount; member
226 sdma_rb_node->refcount++; in qib_user_sdma_queue_create()
235 sdma_rb_node->refcount = 1; in qib_user_sdma_queue_create()
1104 pq->sdma_rb_node->refcount--; in qib_user_sdma_queue_destroy()
1105 if (pq->sdma_rb_node->refcount == 0) { in qib_user_sdma_queue_destroy()
1334 if (pq->sdma_rb_node->refcount > 1) { in qib_user_sdma_push_pkts()
Dqib_mr.c65 atomic_set(&mr->refcount, 1); in init_qib_mregion()
453 i = atomic_read(&fmr->mr.refcount); in qib_map_phys_fmr()
/linux-4.4.14/drivers/scsi/bnx2fc/
Dbnx2fc_io.c36 kref_get(&io_req->refcount); in bnx2fc_cmd_timer_set()
77 io_req->refcount.refcount.counter); in bnx2fc_cmd_timeout()
85 kref_put(&io_req->refcount, bnx2fc_cmd_release); in bnx2fc_cmd_timeout()
106 kref_put(&io_req->refcount, bnx2fc_cmd_release); in bnx2fc_cmd_timeout()
123 kref_put(&io_req->refcount, bnx2fc_cmd_release); in bnx2fc_cmd_timeout()
157 kref_put(&io_req->refcount, bnx2fc_cmd_release); in bnx2fc_cmd_timeout()
447 kref_init(&io_req->refcount); in bnx2fc_elstm_alloc()
502 kref_init(&io_req->refcount); in bnx2fc_cmd_alloc()
509 struct bnx2fc_cmd, refcount); in bnx2fc_cmd_release()
720 kref_put(&io_req->refcount, bnx2fc_cmd_release); in bnx2fc_initiate_tmf()
[all …]
Dbnx2fc_els.c40 kref_put(&orig_io_req->refcount, bnx2fc_cmd_release); in bnx2fc_rrq_compl()
108 kref_put(&aborted_io_req->refcount, bnx2fc_cmd_release); in bnx2fc_send_rrq()
364 kref_put(&orig_io_req->refcount, bnx2fc_cmd_release); in bnx2fc_srr_compl()
570 kref_put(&orig_io_req->refcount, bnx2fc_cmd_release); in bnx2fc_rec_compl()
593 kref_get(&orig_io_req->refcount); in bnx2fc_send_rec()
609 kref_put(&orig_io_req->refcount, bnx2fc_cmd_release); in bnx2fc_send_rec()
634 kref_get(&orig_io_req->refcount); in bnx2fc_send_srr()
653 kref_put(&orig_io_req->refcount, bnx2fc_cmd_release); in bnx2fc_send_srr()
716 kref_put(&els_req->refcount, bnx2fc_cmd_release); in bnx2fc_initiate_els()
737 kref_put(&els_req->refcount, bnx2fc_cmd_release); in bnx2fc_initiate_els()
[all …]
Dbnx2fc_tgt.c192 kref_put(&io_req->refcount, in bnx2fc_flush_active_ios()
225 kref_put(&io_req->refcount, in bnx2fc_flush_active_ios()
257 kref_put(&io_req->refcount, bnx2fc_cmd_release); in bnx2fc_flush_active_ios()
/linux-4.4.14/include/net/
Dnetrom.h96 atomic_t refcount; member
112 atomic_t refcount; member
121 atomic_inc(&((__nr_node)->refcount))
125 if (atomic_dec_and_test(&nr_node->refcount)) { in nr_node_put()
131 atomic_inc(&((__nr_neigh)->refcount))
135 if (atomic_dec_and_test(&nr_neigh->refcount)) { in nr_neigh_put()
Dax25.h161 atomic_t refcount; member
170 atomic_inc(&((ax25)->refcount))
174 if (atomic_dec_and_test(&assoc->refcount)) { in ax25_uid_put()
188 atomic_t refcount; member
197 atomic_inc(&ax25_rt->refcount); in ax25_hold_route()
204 if (atomic_dec_and_test(&ax25_rt->refcount)) in ax25_put_route()
247 atomic_t refcount; member
269 atomic_inc(&((__ax25)->refcount))
273 if (atomic_dec_and_test(&ax25->refcount)) { in ax25_cb_put()
Dnetlabel.h136 atomic_t refcount; member
238 atomic_set(&cache->refcount, 1); in netlbl_secattr_cache_alloc()
252 if (!atomic_dec_and_test(&cache->refcount)) in netlbl_secattr_cache_free()
Dcipso_ipv4.h88 atomic_t refcount; member
/linux-4.4.14/include/drm/
Ddrm_gem.h43 struct kref refcount; member
139 kref_get(&obj->refcount); in drm_gem_object_reference()
148 kref_put(&obj->refcount, drm_gem_object_free); in drm_gem_object_unreference()
161 if (kref_put_mutex(&obj->refcount, drm_gem_object_free, &dev->struct_mutex)) in drm_gem_object_unreference_unlocked()
DdrmP.h382 struct kref refcount; member
713 atomic_t refcount; /* number of users of vblank interruptsper crtc */ member
/linux-4.4.14/drivers/gpu/host1x/
Dchannel.c54 if (channel->refcount == 0) in host1x_channel_get()
58 channel->refcount++; in host1x_channel_get()
70 if (channel->refcount == 1) { in host1x_channel_put()
77 channel->refcount--; in host1x_channel_put()
Dintr.c40 kfree(container_of(kref, struct host1x_waitlist, refcount)); in waiter_release()
93 kref_put(&waiter->refcount, waiter_release); in remove_completed_waiters()
156 kref_put(&waiter->refcount, waiter_release); in run_handlers()
226 kref_init(&waiter->refcount); in host1x_intr_add_action()
228 kref_get(&waiter->refcount); in host1x_intr_add_action()
270 kref_put(&waiter->refcount, waiter_release); in host1x_intr_put_ref()
338 kref_put(&waiter->refcount, waiter_release); in host1x_intr_stop()
Dchannel.h31 unsigned int refcount; member
Dintr.h58 struct kref refcount; member
Ddebug.c51 if (ch->refcount) { in show_channels()
/linux-4.4.14/drivers/tty/vt/
Dconsolemap.c178 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()
555 if (p->refcount > 1) { in con_set_unimap()
592 p->refcount++; in con_set_unimap()
669 dflt->refcount++; in con_set_default_unimap()
[all …]
/linux-4.4.14/drivers/gpu/drm/ttm/
Dttm_object.c74 struct kref refcount; member
135 kref_get(&tfile->refcount); in ttm_object_file_ref()
142 container_of(kref, struct ttm_object_file, refcount); in ttm_object_file_destroy()
153 kref_put(&tfile->refcount, ttm_object_file_destroy); in ttm_object_file_unref()
173 kref_init(&base->refcount); in ttm_base_object_init()
201 container_of(kref, struct ttm_base_object, refcount); in ttm_release_base()
225 kref_put(&base->refcount, ttm_release_base); in ttm_base_object_unref()
242 if (!kref_get_unless_zero(&base->refcount)) in ttm_base_object_lookup()
264 if (!kref_get_unless_zero(&base->refcount)) in ttm_base_object_lookup_for_ref()
307 if (unlikely(atomic_read(&ref->kref.refcount) == 0)) in ttm_ref_object_exists()
[all …]
/linux-4.4.14/drivers/staging/lustre/lnet/lnet/
Dmodule.c69 int refcount; in lnet_unconfigure() local
79 refcount = the_lnet.ln_refcount; in lnet_unconfigure()
83 return (refcount == 0) ? 0 : -EBUSY; in lnet_unconfigure()
/linux-4.4.14/drivers/base/power/
Dcommon.c36 dev->power.subsys_data->refcount++; in dev_pm_get_subsys_data()
39 psd->refcount = 1; in dev_pm_get_subsys_data()
71 if (--psd->refcount == 0) in dev_pm_put_subsys_data()
/linux-4.4.14/drivers/net/ethernet/mellanox/mlx5/core/
Dcq.c50 atomic_inc(&cq->refcount); in mlx5_cq_completion()
62 if (atomic_dec_and_test(&cq->refcount)) in mlx5_cq_completion()
75 atomic_inc(&cq->refcount); in mlx5_cq_event()
86 if (atomic_dec_and_test(&cq->refcount)) in mlx5_cq_event()
112 atomic_set(&cq->refcount, 1); in mlx5_core_create_cq()
172 if (atomic_dec_and_test(&cq->refcount)) in mlx5_core_destroy_cq()
Dsrq.c51 atomic_inc(&srq->refcount); in mlx5_srq_event()
62 if (atomic_dec_and_test(&srq->refcount)) in mlx5_srq_event()
143 atomic_inc(&srq->refcount); in mlx5_core_get_srq()
456 atomic_set(&srq->refcount, 1); in mlx5_core_create_srq()
498 if (atomic_dec_and_test(&srq->refcount)) in mlx5_core_destroy_srq()
Dqp.c52 atomic_inc(&common->refcount); in mlx5_get_rsc()
66 if (atomic_dec_and_test(&common->refcount)) in mlx5_core_put_rsc()
231 atomic_set(&qp->common.refcount, 1); in mlx5_core_create_qp()
/linux-4.4.14/drivers/media/v4l2-core/
Dvideobuf2-memops.c95 __func__, h, atomic_read(h->refcount), vma->vm_start, in vb2_common_vm_open()
98 atomic_inc(h->refcount); in vb2_common_vm_open()
113 __func__, h, atomic_read(h->refcount), vma->vm_start, in vb2_common_vm_close()
Dvideobuf2-vmalloc.c29 atomic_t refcount; member
48 buf->handler.refcount = &buf->refcount; in vb2_vmalloc_alloc()
58 atomic_inc(&buf->refcount); in vb2_vmalloc_alloc()
66 if (atomic_dec_and_test(&buf->refcount)) { in vb2_vmalloc_put()
161 return atomic_read(&buf->refcount); in vb2_vmalloc_num_users()
368 atomic_inc(&buf->refcount); in vb2_vmalloc_get_dmabuf()
Dvideobuf2-dma-contig.c39 atomic_t refcount; member
91 return atomic_read(&buf->refcount); in vb2_dc_num_users()
127 if (!atomic_dec_and_test(&buf->refcount)) in vb2_dc_put()
163 buf->handler.refcount = &buf->refcount; in vb2_dc_alloc()
167 atomic_inc(&buf->refcount); in vb2_dc_alloc()
404 atomic_inc(&buf->refcount); in vb2_dc_get_dmabuf()
Dvideobuf2-dma-sg.c53 atomic_t refcount; member
155 buf->handler.refcount = &buf->refcount; in vb2_dma_sg_alloc()
159 atomic_inc(&buf->refcount); in vb2_dma_sg_alloc()
185 if (atomic_dec_and_test(&buf->refcount)) { in vb2_dma_sg_put()
335 return atomic_read(&buf->refcount); in vb2_dma_sg_num_users()
545 atomic_inc(&buf->refcount); in vb2_dma_sg_get_dmabuf()
/linux-4.4.14/drivers/gpu/drm/nouveau/include/nvkm/subdev/
Dmmu.h10 u32 refcount[2]; member
20 int refcount; member
32 struct kref refcount; member
/linux-4.4.14/kernel/
Dcpu.c71 atomic_t refcount; member
100 atomic_inc(&cpu_hotplug.refcount); in get_online_cpus()
107 int refcount; in put_online_cpus() local
112 refcount = atomic_dec_return(&cpu_hotplug.refcount); in put_online_cpus()
113 if (WARN_ON(refcount < 0)) /* try to fix things up */ in put_online_cpus()
114 atomic_inc(&cpu_hotplug.refcount); in put_online_cpus()
116 if (refcount <= 0 && waitqueue_active(&cpu_hotplug.wq)) in put_online_cpus()
156 if (likely(!atomic_read(&cpu_hotplug.refcount))) in cpu_hotplug_begin()
Dfutex.c202 atomic_t refcount; member
709 atomic_set(&pi_state->refcount, 1); in refill_pi_state_cache()
735 if (!atomic_dec_and_test(&pi_state->refcount)) in free_pi_state()
759 atomic_set(&pi_state->refcount, 1); in free_pi_state()
903 WARN_ON(!atomic_read(&pi_state->refcount)); in attach_to_pi_state()
954 atomic_inc(&pi_state->refcount); in attach_to_pi_state()
1815 atomic_inc(&pi_state->refcount); in futex_requeue()
/linux-4.4.14/fs/squashfs/
Dcache.c103 if (cache->entry[i].refcount == 0) in squashfs_cache_get()
117 entry->refcount = 1; in squashfs_cache_get()
154 if (entry->refcount == 0) in squashfs_cache_get()
156 entry->refcount++; in squashfs_cache_get()
174 cache->name, i, entry->block, entry->refcount, entry->error); in squashfs_cache_get()
191 entry->refcount--; in squashfs_cache_put()
192 if (entry->refcount == 0) { in squashfs_cache_put()
Dsquashfs_fs_sb.h45 int refcount; member
/linux-4.4.14/drivers/gpu/drm/amd/amdgpu/
Damdgpu_ctx.c36 kref_init(&ctx->refcount); in amdgpu_ctx_init()
116 ctx = container_of(ref, struct amdgpu_ctx, refcount); in amdgpu_ctx_do_release()
132 kref_put(&ctx->refcount, amdgpu_ctx_do_release); in amdgpu_ctx_free()
220 kref_get(&ctx->refcount); in amdgpu_ctx_get()
230 kref_put(&ctx->refcount, amdgpu_ctx_do_release); in amdgpu_ctx_put()
303 if (kref_put(&ctx->refcount, amdgpu_ctx_do_release) != 1) in amdgpu_ctx_mgr_fini()
/linux-4.4.14/drivers/infiniband/core/
Dmulticast.c64 atomic_t refcount; member
106 atomic_t refcount; member
121 atomic_t refcount; member
182 if (atomic_dec_and_test(&port->refcount)) in deref_port()
192 if (atomic_dec_and_test(&group->refcount)) { in release_group()
203 if (atomic_dec_and_test(&member->refcount)) in deref_member()
216 atomic_inc(&group->refcount); in queue_join()
412 atomic_inc(&member->refcount); in process_group_error()
456 atomic_inc(&member->refcount); in mcast_work_handler()
508 atomic_inc(&member->refcount); in process_join_error()
[all …]
Dmad_priv.h106 atomic_t refcount; member
115 atomic_t refcount; member
133 int refcount; member
Dmad.c368 atomic_set(&mad_agent_priv->refcount, 1); in ib_register_mad_agent()
535 atomic_set(&mad_snoop_priv->refcount, 1); in ib_register_mad_snoop()
547 if (atomic_dec_and_test(&mad_agent_priv->refcount)) in deref_mad_agent()
553 if (atomic_dec_and_test(&mad_snoop_priv->refcount)) in deref_snoop_agent()
657 atomic_inc(&mad_snoop_priv->refcount); in snoop_send()
682 atomic_inc(&mad_snoop_priv->refcount); in snoop_recv()
861 atomic_inc(&mad_agent_priv->refcount); in handle_outgoing_dr_smp()
901 atomic_inc(&mad_agent_priv->refcount); in handle_outgoing_dr_smp()
1060 atomic_inc(&mad_agent_priv->refcount); in ib_create_send_mad()
1266 mad_send_wr->refcount = 1 + (mad_send_wr->timeout > 0); in ib_post_send_mad()
[all …]
Dmad_rmpp.c55 atomic_t refcount; member
76 if (atomic_dec_and_test(&rmpp_recv->refcount)) in deref_rmpp_recv()
307 atomic_set(&rmpp_recv->refcount, 1); in create_rmpp_recv()
359 atomic_inc(&rmpp_recv->refcount); in acquire_rmpp_recv()
555 atomic_inc(&rmpp_recv->refcount); in start_rmpp()
728 if (mad_send_wr->refcount == 1) in process_rmpp_ack()
734 } else if (mad_send_wr->refcount == 1 && in process_rmpp_ack()
742 mad_send_wr->refcount++; in process_rmpp_ack()
901 mad_send_wr->refcount += (mad_send_wr->timeout == 0); in ib_send_rmpp_mad()
Diwcm.h55 atomic_t refcount; member
Diwcm.c179 BUG_ON(atomic_read(&cm_id_priv->refcount)==0); in iwcm_deref_id()
180 if (atomic_dec_and_test(&cm_id_priv->refcount)) { in iwcm_deref_id()
193 atomic_inc(&cm_id_priv->refcount); in add_ref()
234 atomic_set(&cm_id_priv->refcount, 1); in iw_create_cm_id()
691 if (atomic_read(&cm_id_priv->refcount)==0) in cm_conn_req_handler()
896 BUG_ON(atomic_read(&cm_id_priv->refcount)==0); in cm_work_handler()
958 atomic_inc(&cm_id_priv->refcount); in cm_event_handler()
Daddr.c93 atomic_set(&client->refcount, 1); in rdma_addr_register_client()
100 if (atomic_dec_and_test(&client->refcount)) in put_client()
404 atomic_inc(&client->refcount); in rdma_resolve_ip()
418 atomic_dec(&client->refcount); in rdma_resolve_ip()
Diwpm_util.c59 if (atomic_read(&iwpm_admin.refcount) == 0) { in iwpm_init()
76 atomic_inc(&iwpm_admin.refcount); in iwpm_init()
98 if (atomic_read(&iwpm_admin.refcount) == 0) { in iwpm_exit()
103 if (atomic_dec_and_test(&iwpm_admin.refcount)) { in iwpm_exit()
Diwpm_util.h92 atomic_t refcount; member
Duverbs_main.c332 if (atomic_dec_and_test(&file->device->refcount)) in ib_uverbs_release_file()
887 if (!atomic_inc_not_zero(&dev->refcount)) in ib_uverbs_open()
940 if (atomic_dec_and_test(&dev->refcount)) in ib_uverbs_open()
1087 atomic_set(&uverbs_dev->refcount, 1); in ib_uverbs_add_one()
1152 if (atomic_dec_and_test(&uverbs_dev->refcount)) in ib_uverbs_add_one()
1255 if (atomic_dec_and_test(&uverbs_dev->refcount)) in ib_uverbs_remove_one()
Duverbs.h88 atomic_t refcount; member
Dcma.c151 atomic_t refcount; member
210 atomic_t refcount; member
341 atomic_inc(&cma_dev->refcount); in cma_attach_to_dev()
351 if (atomic_dec_and_test(&cma_dev->refcount)) in cma_deref_dev()
588 if (atomic_dec_and_test(&id_priv->refcount)) in cma_deref_id()
623 atomic_set(&id_priv->refcount, 1); in rdma_create_id()
1779 atomic_inc(&conn_id->refcount); in cma_req_handler()
1959 atomic_inc(&conn_id->refcount); in iw_conn_req_handler()
2056 atomic_inc(&id_priv->refcount); in cma_listen_on_dev()
2381 atomic_inc(&id_priv->refcount); in rdma_resolve_route()
[all …]
/linux-4.4.14/net/rds/
Dib.c117 BUG_ON(atomic_read(&rds_ibdev->refcount) <= 0); in rds_ib_dev_put()
118 if (atomic_dec_and_test(&rds_ibdev->refcount)) in rds_ib_dev_put()
146 atomic_set(&rds_ibdev->refcount, 1); in rds_ib_add_one()
196 atomic_inc(&rds_ibdev->refcount); in rds_ib_add_one()
199 atomic_inc(&rds_ibdev->refcount); in rds_ib_add_one()
232 atomic_inc(&rds_ibdev->refcount); in rds_ib_get_client_data()
/linux-4.4.14/net/core/
Ddev_addr_lists.c39 ha->refcount = 1; in __hw_addr_create_ex()
75 ha->refcount++; in __hw_addr_add_ex()
108 if (--ha->refcount) in __hw_addr_del_entry()
150 ha->refcount++; in __hw_addr_sync_one()
180 if (ha->sync_cnt == ha->refcount) { in __hw_addr_sync_multiple()
208 } else if (ha->refcount == 1) in __hw_addr_sync()
252 if (!ha->sync_cnt || ha->refcount != 1) in __hw_addr_sync_dev()
273 ha->refcount++; in __hw_addr_sync_dev()
437 ha->type == addr_type && ha->refcount == 1) in dev_addr_del()
/linux-4.4.14/drivers/infiniband/hw/mthca/
Dmthca_memfree.c60 int refcount; member
152 icm->refcount = 0; in mthca_alloc_icm()
230 ++table->icm[i]->refcount; in mthca_table_get()
250 ++table->icm[i]->refcount; in mthca_table_get()
268 if (--table->icm[i]->refcount == 0) { in mthca_table_put()
406 ++table->icm[i]->refcount; in mthca_alloc_icm_table()
463 if ((db_tab->page[i].refcount >= MTHCA_DB_REC_PER_PAGE) || in mthca_map_user_db()
470 if (db_tab->page[i].refcount) { in mthca_map_user_db()
471 ++db_tab->page[i].refcount; in mthca_map_user_db()
498 db_tab->page[i].refcount = 1; in mthca_map_user_db()
[all …]
Dmthca_provider.h204 int refcount; member
225 int refcount; member
263 int refcount; member
Dmthca_srq.c259 srq->refcount = 1; in mthca_alloc_srq()
324 c = srq->refcount; in get_srq_refcount()
348 --srq->refcount; in mthca_free_srq()
431 ++srq->refcount; in mthca_srq_event()
449 if (!--srq->refcount) in mthca_srq_event()
Dmthca_cq.c248 ++cq->refcount; in mthca_cq_event()
264 if (!--cq->refcount) in mthca_cq_event()
826 cq->refcount = 1; in mthca_init_cq()
900 c = cq->refcount; in get_cq_refcount()
936 --cq->refcount; in mthca_free_cq()
Dmthca_memfree.h60 int refcount; member
/linux-4.4.14/drivers/gpu/drm/i915/
Di915_gem_debug.c49 !atomic_read(&obj->base.refcount.refcount)) { in i915_verify_lists()
/linux-4.4.14/lib/
Dcpu_rmap.c46 kref_init(&rmap->refcount); in alloc_cpu_rmap()
71 struct cpu_rmap *rmap = container_of(ref, struct cpu_rmap, refcount); in cpu_rmap_release()
81 kref_get(&rmap->refcount); in cpu_rmap_get()
90 return kref_put(&rmap->refcount, cpu_rmap_release); in cpu_rmap_put()
/linux-4.4.14/block/
Dblk-ioc.c26 BUG_ON(atomic_long_read(&ioc->refcount) <= 0); in get_io_context()
27 atomic_long_inc(&ioc->refcount); in get_io_context()
137 BUG_ON(atomic_long_read(&ioc->refcount) <= 0); in put_io_context()
143 if (atomic_long_dec_and_test(&ioc->refcount)) { in put_io_context()
245 atomic_long_set(&ioc->refcount, 1); in create_task_io_context()
/linux-4.4.14/drivers/infiniband/hw/mlx4/
Dmcg.c124 atomic_t refcount; member
444 if (atomic_dec_and_test(&group->refcount)) { in release_group()
448 atomic_inc(&group->refcount); in release_group()
577 atomic_inc(&group->refcount); in mlx4_ib_mcg_timeout_handler()
579 safe_atomic_dec(&group->refcount); in mlx4_ib_mcg_timeout_handler()
781 atomic_inc(&group->refcount); in search_relocate_mgid0_group()
869 atomic_inc(&group->refcount); in acquire_group()
877 atomic_inc(&group->refcount); /* for the request */ in queue_req()
878 atomic_inc(&group->refcount); /* for scheduling the work */ in queue_req()
883 safe_atomic_dec(&group->refcount); in queue_req()
[all …]
/linux-4.4.14/drivers/infiniband/hw/cxgb3/
Diwch_cm.h58 ep, atomic_read(&((ep)->kref.refcount))); \
59 WARN_ON(atomic_read(&((ep)->kref.refcount)) < 1); \
65 ep, atomic_read(&((ep)->kref.refcount))); \
/linux-4.4.14/drivers/media/common/siano/
Dsmsdvb-debugfs.c39 struct kref refcount; member
341 kref_get(&debug_data->refcount); in smsdvb_stats_open()
357 debug_data = container_of(ref, struct smsdvb_debugfs, refcount); in smsdvb_debugfs_data_release()
382 kref_get(&debug_data->refcount); in smsdvb_stats_poll()
390 kref_put(&debug_data->refcount, smsdvb_debugfs_data_release); in smsdvb_stats_poll()
401 kref_get(&debug_data->refcount); in smsdvb_stats_read()
434 kref_put(&debug_data->refcount, smsdvb_debugfs_data_release); in smsdvb_stats_read()
447 kref_put(&debug_data->refcount, smsdvb_debugfs_data_release); in smsdvb_stats_release()
500 kref_init(&debug_data->refcount); in smsdvb_debugfs_create()
515 kref_put(&client->debug_data->refcount, smsdvb_debugfs_data_release); in smsdvb_debugfs_release()
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/
Dbase.c233 if (--vpgt->refcount[big]) in nvkm_vm_unmap_pgt()
269 vpgt->refcount[big]++; in nvkm_vm_map_pgt()
298 if (likely(vpgt->refcount[big])) { in nvkm_vm_get()
299 vpgt->refcount[big]++; in nvkm_vm_get()
354 vm->pgt[0].refcount[0] = 1; in nvkm_vm_boot()
378 kref_init(&vm->refcount); in nvkm_vm_create()
457 struct nvkm_vm *vm = container_of(kref, typeof(*vm), refcount); in nvkm_vm_del()
477 kref_get(&ref->refcount); in nvkm_vm_ref()
482 kref_put(&(*ptr)->refcount, nvkm_vm_del); in nvkm_vm_ref()
Dnv41.c103 mmu->vm->pgt[0].refcount[0] = 1; in nv41_mmu_oneinit()
Dnv04.c92 mmu->vm->pgt[0].refcount[0] = 1; in nv04_mmu_oneinit()
Dnv44.c184 mmu->vm->pgt[0].refcount[0] = 1; in nv44_mmu_oneinit()
/linux-4.4.14/drivers/staging/comedi/
Dcomedi_buf.c34 container_of(kref, struct comedi_buf_map, refcount); in comedi_buf_map_kref_release()
102 kref_init(&bm->refcount); in __comedi_buf_alloc()
154 kref_get(&bm->refcount); in comedi_buf_map_get()
160 return kref_put(&bm->refcount, comedi_buf_map_kref_release); in comedi_buf_map_put()
191 return bm && (atomic_read(&bm->refcount.refcount) > 1); in comedi_buf_is_mmapped()
Dcomedidev.h259 struct kref refcount; member
543 struct kref refcount; member
/linux-4.4.14/drivers/net/ethernet/mellanox/mlx4/
Dcq.c72 if (atomic_dec_and_test(&mcq->refcount)) in mlx4_cq_tasklet_cb()
94 atomic_inc(&cq->refcount); in mlx4_add_cq_to_tasklet()
125 atomic_inc(&cq->refcount); in mlx4_cq_event()
136 if (atomic_dec_and_test(&cq->refcount)) in mlx4_cq_event()
338 atomic_set(&cq->refcount, 1); in mlx4_cq_alloc()
380 if (atomic_dec_and_test(&cq->refcount)) in mlx4_cq_free()
Dsrq.c52 atomic_inc(&srq->refcount); in mlx4_srq_event()
63 if (atomic_dec_and_test(&srq->refcount)) in mlx4_srq_event()
209 atomic_set(&srq->refcount, 1); in mlx4_srq_alloc()
238 if (atomic_dec_and_test(&srq->refcount)) in mlx4_srq_free()
Dicm.c148 icm->refcount = 0; in mlx4_alloc_icm()
259 ++table->icm[i]->refcount; in mlx4_table_get()
279 ++table->icm[i]->refcount; in mlx4_table_get()
295 if (--table->icm[i]->refcount == 0) { in mlx4_table_put()
432 ++table->icm[i]->refcount; in mlx4_init_icm_table()
Dicm.h59 int refcount; member
Dqp.c58 atomic_inc(&qp->refcount); in mlx4_qp_event()
69 if (atomic_dec_and_test(&qp->refcount)) in mlx4_qp_event()
403 atomic_set(&qp->refcount, 1); in mlx4_qp_alloc()
497 if (atomic_dec_and_test(&qp->refcount)) in mlx4_qp_free()
/linux-4.4.14/drivers/staging/rdma/amso1100/
Dc2_cq.c57 atomic_inc(&cq->refcount); in c2_cq_get()
64 if (atomic_dec_and_test(&cq->refcount)) in c2_cq_put()
365 atomic_set(&cq->refcount, 1); in c2_init_cq()
401 atomic_dec(&cq->refcount); in c2_free_cq()
404 wait_event(cq->wait, !atomic_read(&cq->refcount)); in c2_free_cq()
Dc2_provider.h94 atomic_t refcount; member
111 atomic_t refcount; member
Dc2_provider.c210 atomic_inc(&qp->refcount); in c2_add_ref()
218 if (atomic_dec_and_test(&qp->refcount)) in c2_rem_ref()
230 (qp?atomic_read(&qp->refcount):0)); in c2_get_qp()
Dc2_qp.c506 atomic_set(&qp->refcount, 1); in c2_alloc_qp()
636 atomic_dec(&qp->refcount); in c2_free_qp()
637 wait_event(qp->wait, !atomic_read(&qp->refcount)); in c2_free_qp()
/linux-4.4.14/net/8021q/
Dvlan_core.c158 int refcount; member
248 vid_info->refcount++; in vlan_vid_add()
300 vid_info->refcount--; in vlan_vid_del()
301 if (vid_info->refcount == 0) { in vlan_vid_del()
/linux-4.4.14/fs/overlayfs/
Dreaddir.c32 long refcount; member
177 WARN_ON(cache->refcount <= 0); in ovl_cache_put()
178 cache->refcount--; in ovl_cache_put()
179 if (!cache->refcount) { in ovl_cache_put()
338 cache->refcount++; in ovl_cache_get()
347 cache->refcount = 1; in ovl_cache_get()
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/engine/device/
Duser.c220 if (!--device->refcount) { in nvkm_udevice_fini()
223 device->refcount++; in nvkm_udevice_fini()
241 if (!device->refcount++) { in nvkm_udevice_init()
244 device->refcount--; in nvkm_udevice_init()
/linux-4.4.14/include/media/
Dvideobuf2-memops.h28 atomic_t *refcount; member
/linux-4.4.14/drivers/char/agp/
Di460-agp.c78 int refcount; /* number of kernel pages using the large page */ member
386 lp->refcount = 0; in i460_alloc_large_page()
455 ++lp->refcount; in i460_insert_memory_large_io_page()
484 --lp->refcount; in i460_remove_memory_large_io_page()
488 if (lp->refcount == 0) { in i460_remove_memory_large_io_page()
Dintel-gtt.c77 int refcount; member
1355 intel_private.refcount++; in intel_gmch_probe()
1379 intel_private.refcount++; in intel_gmch_probe()
1430 if (--intel_private.refcount) in intel_gmch_remove()
/linux-4.4.14/fs/cifs/
Dfile.c2085 kref_put(&wdata->refcount, cifs_writedata_release); in cifs_writepages()
2095 kref_put(&wdata->refcount, cifs_writedata_release); in cifs_writepages()
2119 kref_put(&wdata->refcount, cifs_writedata_release); in cifs_writepages()
2392 cifs_uncached_writedata_release(struct kref *refcount) in cifs_uncached_writedata_release() argument
2395 struct cifs_writedata *wdata = container_of(refcount, in cifs_uncached_writedata_release()
2396 struct cifs_writedata, refcount); in cifs_uncached_writedata_release()
2400 cifs_writedata_release(refcount); in cifs_uncached_writedata_release()
2419 kref_put(&wdata->refcount, cifs_uncached_writedata_release); in cifs_uncached_writev_complete()
2543 kref_put(&wdata->refcount, in cifs_write_from_iter()
2642 kref_put(&wdata->refcount, in cifs_user_writev()
[all …]
Dcifsproto.h496 void cifs_readdata_release(struct kref *refcount);
505 void cifs_writedata_release(struct kref *refcount);
/linux-4.4.14/drivers/infiniband/hw/usnic/
Dusnic_ib_sysfs.c98 if (atomic_read(&us_ibdev->vf_cnt.refcount) > 0) { in usnic_ib_show_config()
117 atomic_read(&us_ibdev->vf_cnt.refcount)); in usnic_ib_show_config()
165 atomic_read(&us_ibdev->vf_cnt.refcount)); in usnic_ib_show_max_vf()
/linux-4.4.14/net/ipv4/netfilter/
Dipt_CLUSTERIP.c43 atomic_t refcount; /* reference count */ member
80 atomic_inc(&c->refcount); in clusterip_config_get()
92 if (atomic_dec_and_test(&c->refcount)) in clusterip_config_put()
147 if (unlikely(!atomic_inc_not_zero(&c->refcount))) in clusterip_config_find_get()
185 atomic_set(&c->refcount, 1); in clusterip_config_init()
/linux-4.4.14/fs/f2fs/
Dextent_cache.c71 atomic_set(&et->refcount, 0); in __grab_extent_tree()
75 atomic_inc(&et->refcount); in __grab_extent_tree()
574 if (!atomic_read(&et->refcount)) { in f2fs_shrink_extent_tree()
660 atomic_dec(&et->refcount); in f2fs_destroy_extent_tree()
669 atomic_dec(&et->refcount); in f2fs_destroy_extent_tree()
670 f2fs_bug_on(sbi, atomic_read(&et->refcount) || et->count); in f2fs_destroy_extent_tree()
/linux-4.4.14/drivers/rpmsg/
Dvirtio_rpmsg_bus.c205 refcount); in __ept_release()
228 kref_init(&ept->refcount); in __rpmsg_create_ept()
260 kref_put(&ept->refcount, __ept_release); in __rpmsg_create_ept()
334 kref_put(&ept->refcount, __ept_release); in __rpmsg_destroy_ept()
811 kref_get(&ept->refcount); in rpmsg_recv_single()
826 kref_put(&ept->refcount, __ept_release); in rpmsg_recv_single()
/linux-4.4.14/init/
Dversion.c27 .refcount = ATOMIC_INIT(2),
/linux-4.4.14/fs/
Ddirect-io.c127 unsigned long refcount; /* direct_io_worker() and bios */ member
301 remaining = --dio->refcount; in dio_bio_end_aio()
332 if (--dio->refcount == 1 && dio->waiter) in dio_bio_end_io()
396 dio->refcount++; in dio_bio_submit()
444 while (dio->refcount > 1 && dio->bio_list == NULL) { in dio_await_one()
1077 ret2 = --dio->refcount; in drop_refcount()
1237 dio->refcount = 1; in do_blockdev_direct_IO()
Duserfaultfd.c51 atomic_t refcount; member
119 if (!atomic_inc_not_zero(&ctx->refcount)) in userfaultfd_ctx_get()
133 if (atomic_dec_and_test(&ctx->refcount)) { in userfaultfd_ctx_put()
1286 atomic_set(&ctx->refcount, 1); in userfaultfd_file_create()
/linux-4.4.14/drivers/char/ipmi/
Dipmi_msghandler.c102 struct kref refcount; member
315 struct kref refcount; member
554 ipmi_smi_t intf = container_of(ref, struct ipmi_smi, refcount); in intf_free()
583 kref_get(&intf->refcount); in ipmi_smi_watcher_register()
597 kref_put(&e->intf->refcount, intf_free); in ipmi_smi_watcher_register()
610 kref_put(&e->intf->refcount, intf_free); in ipmi_smi_watcher_register()
972 kref_get(&intf->refcount); in ipmi_create_user()
974 kref_init(&new_user->refcount); in ipmi_create_user()
1012 kref_put(&intf->refcount, intf_free); in ipmi_create_user()
1049 ipmi_user_t user = container_of(ref, struct ipmi_user, refcount); in free_user()
[all …]
/linux-4.4.14/drivers/tty/
Dtty_ldisc.c71 new_ldisc->refcount = 0; in tty_register_ldisc()
99 if (tty_ldiscs[disc]->refcount) in tty_unregister_ldisc()
120 ldops->refcount++; in get_ldops()
133 ldops->refcount--; in put_ldops()
/linux-4.4.14/fs/ocfs2/
Docfs2_trace.h902 unsigned int clusters, unsigned int refcount),
903 TP_ARGS(blkno, index, cpos, clusters, refcount),
909 __field(unsigned int, refcount)
916 __entry->refcount = refcount;
919 __entry->cpos, __entry->clusters, __entry->refcount)
926 unsigned int count, unsigned int refcount), \
927 TP_ARGS(blkno, index, cpos, count, refcount))
933 unsigned int clusters, unsigned int refcount,
936 TP_ARGS(cpos, clusters, refcount,
941 __field(unsigned int, refcount)
[all …]
/linux-4.4.14/drivers/acpi/apei/
Derst.c439 int refcount; member
444 .refcount = 0,
471 erst_record_id_cache.refcount++; in erst_get_record_id_begin()
562 BUG_ON(!erst_record_id_cache.refcount); in erst_get_record_id_next()
603 if (erst_record_id_cache.refcount) in __erst_record_id_cache_compact()
627 erst_record_id_cache.refcount--; in erst_get_record_id_end()
628 BUG_ON(erst_record_id_cache.refcount < 0); in erst_get_record_id_end()
/linux-4.4.14/drivers/block/zram/
Dzram_drv.h108 atomic_t refcount; /* refcount for zram_meta */ member
/linux-4.4.14/security/apparmor/include/
Dapparmor.h83 return atomic_inc_not_zero(&kref->refcount); in kref_get_not0()
/linux-4.4.14/fs/ocfs2/dlm/
Ddlmdebug.c84 atomic_read(&lock->lock_refs.refcount), in __dlm_print_lock()
109 res->last_used, atomic_read(&res->refs.refcount), in __dlm_print_one_lock_resource()
301 atomic_read(&mle->mle_refs.refcount)); in dump_mle()
517 atomic_read(&lock->lock_refs.refcount)); in dump_lock()
544 atomic_read(&res->refs.refcount)); in dump_lockres()
800 atomic_read(&dlm->dlm_refs.refcount)); in debug_state_print()
/linux-4.4.14/drivers/s390/crypto/
Dzcrypt_api.h105 struct kref refcount; /* device refcounting */ member
Dzcrypt_api.c205 container_of(kref, struct zcrypt_device, refcount); in zcrypt_device_release()
211 kref_get(&zdev->refcount); in zcrypt_device_get()
217 return kref_put(&zdev->refcount, zcrypt_device_release); in zcrypt_device_put()
267 kref_init(&zdev->refcount); in zcrypt_device_register()
/linux-4.4.14/drivers/gpu/drm/nouveau/include/nvkm/engine/
Dfifo.h10 int refcount; member
/linux-4.4.14/drivers/gpu/drm/msm/
Dmsm_fb.c80 fb->refcount.refcount.counter, fb->base.id); in msm_framebuffer_describe()
Dmsm_gem.c488 obj->name, obj->refcount.refcount.counter, in msm_gem_describe()
/linux-4.4.14/net/wireless/
Dscan.c90 bss->refcount++; in bss_ref_get()
95 bss->refcount++; in bss_ref_get()
109 hbss->refcount--; in bss_ref_put()
110 if (hbss->refcount == 0) in bss_ref_put()
113 bss->refcount--; in bss_ref_put()
114 if (bss->refcount == 0) in bss_ref_put()
736 new->refcount += bss->refcount; in cfg80211_combine_bsses()
864 new->refcount = 1; in cfg80211_bss_update()
876 hidden->refcount++; in cfg80211_bss_update()
/linux-4.4.14/net/ipv4/
Dcipso_ipv4.c338 atomic_inc(&entry->lsm_data->refcount); in cipso_v4_cache_check()
405 atomic_inc(&secattr->cache->refcount); in cipso_v4_cache_add()
448 if (iter->doi == doi && atomic_read(&iter->refcount)) in cipso_v4_doi_search()
502 atomic_set(&doi_def->refcount, 1); in cipso_v4_doi_add()
606 if (!atomic_dec_and_test(&doi_def->refcount)) { in cipso_v4_doi_remove()
649 if (!atomic_inc_not_zero(&doi_def->refcount)) in cipso_v4_doi_getdef()
670 if (!atomic_dec_and_test(&doi_def->refcount)) in cipso_v4_doi_putdef()
703 if (atomic_read(&iter_doi->refcount) > 0) { in cipso_v4_doi_walk()
/linux-4.4.14/drivers/vhost/
Dnet.c79 atomic_t refcount; member
131 atomic_set(&ubufs->refcount, 1); in vhost_net_ubuf_alloc()
139 int r = atomic_sub_return(1, &ubufs->refcount); in vhost_net_ubuf_put()
148 wait_event(ubufs->wait, !atomic_read(&ubufs->refcount)); in vhost_net_ubuf_put_and_wait()
385 atomic_inc(&ubufs->refcount); in handle_tx()
781 atomic_set(&n->vqs[VHOST_NET_VQ_TX].ubufs->refcount, 1); in vhost_net_flush()
/linux-4.4.14/drivers/net/wireless/orinoco/
Dorinoco_usb.c271 atomic_t refcount; member
301 if (!atomic_dec_and_test(&ctx->refcount)) in ezusb_request_context_put()
331 atomic_inc(&ctx->refcount); in ezusb_request_timerfn()
364 atomic_set(&ctx->refcount, 1); in ezusb_alloc_ctx()
473 atomic_inc(&ctx->refcount); in ezusb_req_queue_run()
511 atomic_inc(&ctx->refcount); in ezusb_req_enqueue_run()
1468 atomic_inc(&ctx->refcount); in ezusb_delete()
/linux-4.4.14/drivers/pci/hotplug/
Dacpiphp.h122 unsigned int refcount; member
Dacpiphp_glue.c81 context->refcount = 1; in acpiphp_init_context()
102 context->refcount++; in acpiphp_get_context()
116 if (--context->refcount) in acpiphp_put_context()
/linux-4.4.14/include/drm/ttm/
Dttm_object.h131 struct kref refcount; member
Dttm_bo_driver.h855 WARN_ON(!atomic_read(&bo->kref.refcount)); in ttm_bo_reserve()
880 WARN_ON(!atomic_read(&bo->kref.refcount)); in ttm_bo_reserve_slowpath()
/linux-4.4.14/drivers/dma-buf/
Dfence.c175 container_of(kref, struct fence, refcount); in fence_release()
522 kref_init(&fence->refcount); in fence_init()
/linux-4.4.14/ipc/
Dutil.c445 atomic_set(&out->refcount, 1); in ipc_rcu_alloc()
453 return atomic_inc_not_zero(&p->refcount); in ipc_rcu_getref()
460 if (!atomic_dec_and_test(&p->refcount)) in ipc_rcu_putref()
Dutil.h52 atomic_t refcount; member
/linux-4.4.14/drivers/acpi/
Dosl.c93 unsigned long refcount; member
315 map->refcount++; in acpi_os_get_iomem()
387 map->refcount++; in acpi_os_map_iomem()
410 map->refcount = 1; in acpi_os_map_iomem()
429 if (!--map->refcount) in acpi_os_drop_map_ref()
435 if (!map->refcount) { in acpi_os_map_cleanup()
/linux-4.4.14/drivers/video/fbdev/vermilion/
Dvermilion.h202 atomic_t refcount; member
/linux-4.4.14/include/linux/mlx5/
Dcq.h45 atomic_t refcount; member
/linux-4.4.14/drivers/infiniband/hw/nes/
Dnes_verbs.c126 atomic_set(&cqp_request->refcount, 2); in nes_alloc_mw()
183 atomic_set(&cqp_request->refcount, 2); in nes_dealloc_mw()
350 atomic_set(&cqp_request->refcount, 2); in alloc_fast_reg_mr()
1340 atomic_set(&cqp_request->refcount, 2); in nes_create_qp()
1473 nesqp->hwqp.qp_id, cm_id, atomic_read(&nesqp->refcount)); in nes_destroy_qp()
1723 atomic_set(&cqp_request->refcount, 2); in nes_create_cq()
1827 atomic_set(&cqp_request->refcount, 2); in nes_destroy_cq()
2039 atomic_set(&cqp_request->refcount, 2); in nes_reg_mr()
2685 atomic_set(&cqp_request->refcount, 2); in nes_dereg_mr()
2852 nesqp->hwqp.qp_id, atomic_read(&nesqp->refcount)); in nes_hw_modify_qp()
[all …]
Dnes_verbs.h157 atomic_t refcount; member
Dnes.c272 ibqp->qp_num, atomic_read(&nesqp->refcount)); in nes_add_ref()
273 atomic_inc(&nesqp->refcount); in nes_add_ref()
321 if (atomic_read(&nesqp->refcount) == 0) { in nes_rem_ref()
327 if (atomic_dec_and_test(&nesqp->refcount)) { in nes_rem_ref()
/linux-4.4.14/drivers/usb/atm/
Dusbatm.h156 struct kref refcount; member
Dusbatm.c709 struct usbatm_data *instance = container_of(kref, struct usbatm_data, refcount); in usbatm_destroy_instance()
719 kref_get(&instance->refcount); in usbatm_get_instance()
724 kref_put(&instance->refcount, usbatm_destroy_instance); in usbatm_put_instance()
1078 kref_init(&instance->refcount); /* dropped in usbatm_usb_disconnect */ in usbatm_usb_probe()
/linux-4.4.14/net/sunrpc/
Dsvcauth.c130 if (atomic_dec_and_lock(&dom->ref.refcount, &auth_domain_lock)) { in auth_domain_put()
/linux-4.4.14/Documentation/filesystems/
Dpath-lookup.txt177 In refcount based dcache lookups, d_lock is used to serialise access to
199 lookup which does not increment the refcount on the dentry or write to
270 | children:NULL | its refcount because we're holding d_lock.
273 Taking a refcount on a dentry from rcu-walk mode, by taking its d_lock,
274 re-checking its d_seq, and then incrementing its refcount is called
312 verify d_seq, increment refcount).
330 refcount on final dentry.
/linux-4.4.14/drivers/scsi/mpt3sas/
Dmpt3sas_base.h474 struct kref refcount; member
479 kref_get(&s->refcount); in sas_device_get()
484 kfree(container_of(r, struct _sas_device, refcount)); in sas_device_free()
489 kref_put(&s->refcount, sas_device_free); in sas_device_put()
/linux-4.4.14/net/ax25/
Dax25_uid.c110 atomic_set(&ax25_uid->refcount, 1); in ax25_uid_ioctl()
/linux-4.4.14/drivers/gpu/drm/exynos/
Dexynos_drm_g2d.c199 atomic_t refcount; member
376 atomic_dec(&g2d_userptr->refcount); in g2d_userptr_put_dma_addr()
378 if (atomic_read(&g2d_userptr->refcount) > 0) in g2d_userptr_put_dma_addr()
436 atomic_inc(&g2d_userptr->refcount); in g2d_userptr_get_dma_addr()
461 atomic_set(&g2d_userptr->refcount, 1); in g2d_userptr_get_dma_addr()
/linux-4.4.14/drivers/s390/scsi/
Dzfcp_fc.h184 atomic_t refcount; member
Dzfcp_fc.c164 atomic_inc(&wka_port->refcount); in zfcp_fc_wka_port_get()
177 if ((atomic_read(&wka_port->refcount) != 0) || in zfcp_fc_wka_port_offline()
192 if (atomic_dec_return(&wka_port->refcount) != 0) in zfcp_fc_wka_port_put()
207 atomic_set(&wka_port->refcount, 0); in zfcp_fc_wka_port_init()
/linux-4.4.14/drivers/infiniband/ulp/isert/
Dib_isert.h204 int refcount; member
/linux-4.4.14/kernel/events/
Dinternal.h12 atomic_t refcount; member
Dring_buffer.c242 atomic_set(&rb->refcount, 1); in ring_buffer_init()
251 if (!atomic_dec_and_test(&rb->refcount)) in ring_buffer_put_async()
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/engine/fifo/
Dchan.c116 if (!--engn->refcount) { in nvkm_fifo_chan_child_del()
148 if (!engn->refcount++) { in nvkm_fifo_chan_child_new()
/linux-4.4.14/drivers/scsi/lpfc/
Dlpfc_hbadisc.c3433 atomic_read(&ndlp->kref.refcount), in lpfc_mbx_cmpl_reg_login()
3854 atomic_read(&ndlp->kref.refcount), in lpfc_mbx_cmpl_ns_reg_login()
4231 atomic_read(&ndlp->kref.refcount)); in lpfc_enable_node()
4241 atomic_read(&ndlp->kref.refcount)); in lpfc_enable_node()
4265 atomic_read(&ndlp->kref.refcount), in lpfc_enable_node()
4687 atomic_read(&ndlp->kref.refcount)); in lpfc_cleanup_node()
4694 atomic_read(&ndlp->kref.refcount)); in lpfc_cleanup_node()
4783 atomic_read(&ndlp->kref.refcount), in lpfc_nlp_remove()
5549 atomic_read(&ndlp->kref.refcount), in lpfc_mbx_cmpl_fdmi_reg_login()
5720 atomic_read(&ndlp->kref.refcount), in lpfc_nlp_init()
[all …]
/linux-4.4.14/fs/exofs/
Dsys.c125 (int)atomic_read(&k_name->kref.refcount)); in exofs_sysfs_dbg_print()
/linux-4.4.14/drivers/gpu/drm/nouveau/
Dnouveau_fence.c529 WARN_ON(atomic_read(&fence->base.refcount.refcount) <= 1); in nouveau_fence_no_signaling()
/linux-4.4.14/drivers/infiniband/ulp/iser/
Diser_verbs.c569 device->refcount++; in iser_device_find_by_ib_device()
579 device->refcount--; in iser_device_try_release()
580 iser_info("device %p refcount %d\n", device, device->refcount); in iser_device_try_release()
581 if (!device->refcount) { in iser_device_try_release()
/linux-4.4.14/drivers/gpu/drm/radeon/
Dradeon_state.c2007 if ((dev_priv->surfaces[i].refcount != 0) && in alloc_surface()
2028 if ((dev_priv->surfaces[i].refcount == 1) && in alloc_surface()
2037 dev_priv->surfaces[i].refcount++; in alloc_surface()
2044 if ((dev_priv->surfaces[i].refcount == 1) && in alloc_surface()
2053 dev_priv->surfaces[i].refcount++; in alloc_surface()
2062 if (dev_priv->surfaces[i].refcount == 0) { in alloc_surface()
2069 dev_priv->surfaces[i].refcount = 1; in alloc_surface()
2104 dev_priv->surfaces[s->surface_index].refcount--; in free_surface()
2106 refcount == 0) in free_surface()
/linux-4.4.14/include/linux/sunrpc/
Dcache.h203 if (atomic_read(&h->ref.refcount) <= 2 && in cache_put()
/linux-4.4.14/net/netrom/
Dnr_route.c152 atomic_set(&nr_neigh->refcount, 1); in nr_add_node()
187 atomic_set(&nr_node->refcount, 1); in nr_add_node()
434 atomic_set(&nr_neigh->refcount, 1); in nr_add_neigh()
/linux-4.4.14/net/sunrpc/xprtrdma/
Dsvc_rdma_transport.c306 if (atomic_read(&xprt->sc_xprt.xpt_ref.refcount)==0) in rq_comp_handler()
488 if (atomic_read(&xprt->sc_xprt.xpt_ref.refcount)==0) in sq_comp_handler()
1166 if (atomic_read(&rdma->sc_xprt.xpt_ref.refcount) != 0) in __svc_rdma_free()
1168 atomic_read(&rdma->sc_xprt.xpt_ref.refcount)); in __svc_rdma_free()
/linux-4.4.14/drivers/misc/mei/
Ddebugfs.c69 atomic_read(&me_cl->refcnt.refcount)); in mei_dbgfs_read_meclients()
/linux-4.4.14/include/rdma/
Dib_addr.h53 atomic_t refcount; member
/linux-4.4.14/drivers/infiniband/hw/cxgb4/
Diw_cxgb4.h651 ep, atomic_read(&((ep)->kref.refcount))); \
652 WARN_ON(atomic_read(&((ep)->kref.refcount)) < 1); \
658 ep, atomic_read(&((ep)->kref.refcount))); \
/linux-4.4.14/drivers/scsi/cxgbi/
Dlibcxgbi.h379 fn, csk, atomic_read(&csk->refcnt.refcount)); in __cxgbi_sock_put()
388 fn, csk, atomic_read(&csk->refcnt.refcount)); in __cxgbi_sock_get()
/linux-4.4.14/Documentation/vm/
Dpage_migration86 already been removed from the LRU via isolate_lru_page() and the refcount
106 6. The refcount of the page is examined and we back out if references remain
/linux-4.4.14/net/bluetooth/
Damp.c27 atomic_read(&ctrl->kref.refcount)); in amp_ctrl_get()
45 atomic_read(&ctrl->kref.refcount)); in amp_ctrl_put()

12