Home
last modified time | relevance | path

Searched refs:refcnt (Results 1 – 25 of 530) sorted by relevance

12345678910>>...22

/linux-6.6.21/lib/
Drcuref.c194 unsigned int cnt = atomic_read(&ref->refcnt); in rcuref_get_slowpath()
202 atomic_set(&ref->refcnt, RCUREF_DEAD); in rcuref_get_slowpath()
215 atomic_set(&ref->refcnt, RCUREF_SATURATED); in rcuref_get_slowpath()
238 unsigned int cnt = atomic_read(&ref->refcnt); in rcuref_put_slowpath()
251 if (atomic_cmpxchg_release(&ref->refcnt, RCUREF_NOREF, RCUREF_DEAD) != RCUREF_NOREF) in rcuref_put_slowpath()
268 atomic_set(&ref->refcnt, RCUREF_DEAD); in rcuref_put_slowpath()
278 atomic_set(&ref->refcnt, RCUREF_SATURATED); in rcuref_put_slowpath()
Dlru_cache.c288 return e && e->refcnt; in lc_is_used()
303 BUG_ON(e->refcnt); in lc_del()
376 ++e->refcnt; in __lc_get()
382 if (e->refcnt++ == 0) in __lc_get()
423 BUG_ON(++e->refcnt != 1); in __lc_get()
553 BUG_ON(e->refcnt == 0); in lc_put()
555 if (--e->refcnt == 0) { in lc_put()
561 RETURN(e->refcnt); in lc_put()
598 i, e->lc_number, e->lc_new_number, e->refcnt); in lc_seq_dump_details()
601 i, e->lc_number, "-\"-", e->refcnt); in lc_seq_dump_details()
/linux-6.6.21/include/linux/
Dcgroup_refcnt.h11 percpu_ref_get(&css->refcnt); in css_get()
26 percpu_ref_get_many(&css->refcnt, n); in CGROUP_REF_EXPORT()
45 return percpu_ref_tryget(&css->refcnt); in CGROUP_REF_EXPORT()
64 return percpu_ref_tryget_live(&css->refcnt); in CGROUP_REF_EXPORT()
79 percpu_ref_put(&css->refcnt); in CGROUP_REF_EXPORT()
94 percpu_ref_put_many(&css->refcnt, n); in CGROUP_REF_EXPORT()
Dbacking-dev-defs.h147 struct percpu_ref refcnt; /* used only for !root wb's */ member
170 struct kref refcnt; /* Reference counter for the structure */ member
220 return percpu_ref_tryget(&wb->refcnt); in wb_tryget()
231 percpu_ref_get(&wb->refcnt); in wb_get()
250 percpu_ref_put_many(&wb->refcnt, nr); in wb_put_many()
270 return percpu_ref_is_dying(&wb->refcnt); in wb_dying()
Drcuref.h26 atomic_set(&ref->refcnt, cnt - 1); in rcuref_init()
37 unsigned int c = atomic_read(&ref->refcnt); in rcuref_read()
67 if (likely(!atomic_add_negative_relaxed(1, &ref->refcnt))) in rcuref_get()
87 if (likely(!atomic_add_negative_release(-1, &ref->refcnt))) in __rcuref_put()
/linux-6.6.21/drivers/connector/
Dcn_queue.c34 refcount_set(&cbq->refcnt, 1); in cn_queue_alloc_callback_entry()
36 atomic_inc(&dev->refcnt); in cn_queue_alloc_callback_entry()
47 if (!refcount_dec_and_test(&cbq->refcnt)) in cn_queue_release_callback()
50 atomic_dec(&cbq->pdev->refcnt); in cn_queue_release_callback()
121 atomic_set(&dev->refcnt, 0); in cn_queue_alloc_dev()
139 while (atomic_read(&dev->refcnt)) { in cn_queue_free_dev()
141 dev->name, atomic_read(&dev->refcnt)); in cn_queue_free_dev()
/linux-6.6.21/drivers/gpu/drm/lima/
Dlima_ctx.c18 kref_init(&ctx->refcnt); in lima_ctx_create()
44 struct lima_ctx *ctx = container_of(ref, struct lima_ctx, refcnt); in lima_ctx_do_release()
60 kref_put(&ctx->refcnt, lima_ctx_do_release); in lima_ctx_free()
74 kref_get(&ctx->refcnt); in lima_ctx_get()
81 kref_put(&ctx->refcnt, lima_ctx_do_release); in lima_ctx_put()
96 kref_put(&ctx->refcnt, lima_ctx_do_release); in lima_ctx_mgr_fini()
/linux-6.6.21/drivers/w1/
Dw1_family.c38 atomic_set(&newf->refcnt, 0); in w1_register_family()
73 while (atomic_read(&fent->refcnt)) { in w1_unregister_family()
75 fent->fid, atomic_read(&fent->refcnt)); in w1_unregister_family()
106 atomic_dec(&f->refcnt); in __w1_family_put()
128 atomic_inc(&f->refcnt); in __w1_family_get()
/linux-6.6.21/kernel/cgroup/
Ddebug.c46 int i, refcnt; in current_css_set_read() local
54 refcnt = refcount_read(&cset->refcount); in current_css_set_read()
55 seq_printf(seq, "css_set %pK %d", cset, refcnt); in current_css_set_read()
56 if (refcnt > cset->nr_tasks) in current_css_set_read()
57 seq_printf(seq, " +%d", refcnt - cset->nr_tasks); in current_css_set_read()
126 int refcnt = refcount_read(&cset->refcount); in cgroup_css_links_read() local
148 seq_printf(seq, " %d", refcnt); in cgroup_css_links_read()
149 if (refcnt - cset->nr_tasks > 0) { in cgroup_css_links_read()
150 int extra = refcnt - cset->nr_tasks; in cgroup_css_links_read()
/linux-6.6.21/crypto/
Dcryptd.c70 refcount_t refcnt; member
79 refcount_t refcnt; member
90 refcount_t refcnt; member
135 refcount_t *refcnt; in cryptd_enqueue_request() local
141 refcnt = crypto_tfm_ctx(request->tfm); in cryptd_enqueue_request()
148 if (!refcount_read(refcnt)) in cryptd_enqueue_request()
151 refcount_inc(refcnt); in cryptd_enqueue_request()
273 int refcnt = refcount_read(&ctx->refcnt); in cryptd_skcipher_complete() local
284 } else if (refcnt && refcount_dec_and_test(&ctx->refcnt)) in cryptd_skcipher_complete()
518 int refcnt = refcount_read(&ctx->refcnt); in cryptd_hash_complete() local
[all …]
/linux-6.6.21/include/net/
Dx25.h135 refcount_t refcnt; member
147 refcount_t refcnt; member
177 atomic_t refcnt; member
245 refcount_inc(&nb->refcnt); in x25_neigh_hold()
250 if (refcount_dec_and_test(&nb->refcnt)) in x25_neigh_put()
268 refcount_inc(&rt->refcnt); in x25_route_hold()
273 if (refcount_dec_and_test(&rt->refcnt)) in x25_route_put()
Dllc.h58 refcount_t refcnt; member
119 refcount_inc(&sap->refcnt); in llc_sap_hold()
124 return refcount_inc_not_zero(&sap->refcnt); in llc_sap_hold_safe()
131 if (refcount_dec_and_test(&sap->refcnt)) in llc_sap_put()
/linux-6.6.21/drivers/net/ethernet/chelsio/cxgb4/
Dsmt.c60 s->smtab[i].refcnt = 0; in t4_init_smt()
71 if (e->refcnt == 0) { in find_or_alloc_smte()
100 if (e->refcnt == 0) { /* hasn't been recycled */ in t4_smte_free()
114 if ((--e->refcnt) == 0) in cxgb4_smt_release()
219 if (!e->refcnt) { in t4_smt_alloc_switching()
220 e->refcnt = 1; in t4_smt_alloc_switching()
226 ++e->refcnt; in t4_smt_alloc_switching()
Dl2t.c72 if (atomic_add_return(1, &e->refcnt) == 1) /* 0 -> 1 transition */ in l2t_hold()
273 if (atomic_read(&e->refcnt) == 0) in alloc_l2e()
276 for (e = d->l2tab; atomic_read(&e->refcnt); ++e) in alloc_l2e()
305 if (atomic_read(&e->refcnt) == 0) { in find_or_alloc_l2e()
355 if (atomic_read(&e->refcnt) == 0) { /* hasn't been recycled */ in _t4_l2e_free()
373 if (atomic_read(&e->refcnt) == 0) { /* hasn't been recycled */ in t4_l2e_free()
388 if (atomic_dec_and_test(&e->refcnt)) in cxgb4_l2t_release()
444 if (atomic_read(&e->refcnt) == 1) in cxgb4_l2t_get()
461 atomic_set(&e->refcnt, 1); in cxgb4_l2t_get()
523 if (atomic_read(&e->refcnt)) in t4_l2t_update()
[all …]
/linux-6.6.21/arch/x86/kernel/
Dioport.c30 refcount_inc(&current->thread.io_bitmap->refcnt); in io_bitmap_share()
58 if (iobm && refcount_dec_and_test(&iobm->refcnt)) in io_bitmap_exit()
92 refcount_set(&iobm->refcnt, 1); in ksys_ioperm()
100 if (refcount_read(&iobm->refcnt) > 1) { in ksys_ioperm()
104 refcount_set(&iobm->refcnt, 1); in ksys_ioperm()
/linux-6.6.21/drivers/infiniband/hw/mlx4/
Ddoorbell.c42 int refcnt; member
66 page->refcnt = 0; in mlx4_ib_db_map_user()
81 ++page->refcnt; in mlx4_ib_db_map_user()
93 if (!--db->u.user_page->refcnt) { in mlx4_ib_db_unmap_user()
/linux-6.6.21/drivers/infiniband/hw/mlx5/
Ddoorbell.c44 int refcnt; member
68 page->refcnt = 0; in mlx5_ib_db_map_user()
85 ++page->refcnt; in mlx5_ib_db_map_user()
97 if (!--db->u.user_page->refcnt) { in mlx5_ib_db_unmap_user()
/linux-6.6.21/tools/lib/perf/
Dthreadmap.c57 refcount_set(&threads->refcnt, 1); in perf_thread_map__new_array()
72 WARN_ONCE(refcount_read(&threads->refcnt) != 0, in perf_thread_map__delete()
83 refcount_inc(&map->refcnt); in perf_thread_map__get()
89 if (map && refcount_dec_and_test(&map->refcnt)) in perf_thread_map__put()
Dmmap.c25 refcount_set(&map->refcnt, 0); in perf_mmap__init()
58 refcount_set(&map->refcnt, 0); in perf_mmap__munmap()
66 refcount_inc(&map->refcnt); in perf_mmap__get()
71 BUG_ON(map->base && refcount_read(&map->refcnt) == 0); in perf_mmap__put()
73 if (refcount_dec_and_test(&map->refcnt)) in perf_mmap__put()
102 if (refcount_read(&map->refcnt) == 1 && perf_mmap__empty(map)) in perf_mmap__consume()
180 if (!refcount_read(&map->refcnt)) in perf_mmap__read_init()
197 if (!refcount_read(&map->refcnt)) in perf_mmap__read_done()
265 if (!refcount_read(&map->refcnt)) in perf_mmap__read_event()
/linux-6.6.21/include/trace/events/
Dmodule.h78 __field( int, refcnt )
84 __entry->refcnt = atomic_read(&mod->refcnt);
89 __get_str(name), (void *)__entry->ip, __entry->refcnt)
Dneigh.h88 __field(int, refcnt)
113 __entry->refcnt = refcount_read(&n->refcnt);
148 __entry->type, __entry->dead, __entry->refcnt,
168 __field(int, refcnt)
190 __entry->refcnt = refcount_read(&n->refcnt);
221 __entry->type, __entry->dead, __entry->refcnt,
/linux-6.6.21/drivers/media/platform/nvidia/tegra-vde/
Ddmabuf-cache.c29 unsigned int refcnt; member
36 WARN_ON_ONCE(entry->refcnt); in tegra_vde_release_entry()
144 entry->refcnt++; in tegra_vde_dmabuf_cache_map()
176 WARN_ON_ONCE(!entry->refcnt); in tegra_vde_dmabuf_cache_unmap()
178 if (--entry->refcnt == 0) { in tegra_vde_dmabuf_cache_unmap()
197 if (entry->refcnt) in tegra_vde_dmabuf_cache_unmap_sync()
/linux-6.6.21/arch/sparc/kernel/
Dhvapi.c22 unsigned int refcnt; member
72 p->refcnt++; in __get_ref()
77 if (--p->refcnt == 0) { in __put_ref()
107 if (p->refcnt) { in sun4v_hvapi_register()
171 if (p && p->refcnt) { in sun4v_hvapi_get()
/linux-6.6.21/net/netfilter/
Dxt_IDLETIMER.c41 unsigned int refcnt; member
168 info->timer->refcnt = 1; in idletimer_tg_create()
220 info->timer->refcnt = 1; in idletimer_tg_create_v1()
323 info->timer->refcnt++; in idletimer_tg_checkentry()
328 info->label, info->timer->refcnt); in idletimer_tg_checkentry()
374 info->timer->refcnt++; in idletimer_tg_checkentry_v1()
390 info->label, info->timer->refcnt); in idletimer_tg_checkentry_v1()
412 if (--info->timer->refcnt == 0) { in idletimer_tg_destroy()
423 info->label, info->timer->refcnt); in idletimer_tg_destroy()
437 if (--info->timer->refcnt == 0) { in idletimer_tg_destroy_v1()
[all …]
/linux-6.6.21/block/
Dholder.c8 int refcnt; member
89 holder->refcnt++; in bd_link_disk_holder()
100 holder->refcnt = 1; in bd_link_disk_holder()
145 if (!WARN_ON_ONCE(holder == NULL) && !--holder->refcnt) { in bd_unlink_disk_holder()

12345678910>>...22