Home
last modified time | relevance | path

Searched refs:kref (Results 1 – 25 of 601) sorted by relevance

12345678910>>...25

/Linux-v4.19/include/linux/
Dkref.h21 struct kref { struct
31 static inline void kref_init(struct kref *kref) in kref_init() argument
33 refcount_set(&kref->refcount, 1); in kref_init()
36 static inline unsigned int kref_read(const struct kref *kref) in kref_read() argument
38 return refcount_read(&kref->refcount); in kref_read()
45 static inline void kref_get(struct kref *kref) in kref_get() argument
47 refcount_inc(&kref->refcount); in kref_get()
67 static inline int kref_put(struct kref *kref, void (*release)(struct kref *kref)) in kref_put() argument
69 if (refcount_dec_and_test(&kref->refcount)) { in kref_put()
70 release(kref); in kref_put()
[all …]
Dutsname.h25 struct kref kref; member
36 kref_get(&ns->kref); in get_uts_ns()
41 extern void free_uts_ns(struct kref *kref);
45 kref_put(&ns->kref, free_uts_ns); in put_uts_ns()
/Linux-v4.19/drivers/target/iscsi/cxgbit/
Dcxgbit.h143 struct kref kref; member
188 struct kref kref; member
215 struct kref kref; member
248 void _cxgbit_free_cdev(struct kref *kref);
249 void _cxgbit_free_csk(struct kref *kref);
250 void _cxgbit_free_cnp(struct kref *kref);
254 kref_get(&cdev->kref); in cxgbit_get_cdev()
259 kref_put(&cdev->kref, _cxgbit_free_cdev); in cxgbit_put_cdev()
264 kref_get(&csk->kref); in cxgbit_get_csk()
269 kref_put(&csk->kref, _cxgbit_free_csk); in cxgbit_put_csk()
[all …]
/Linux-v4.19/drivers/media/cec/
Dcec-notifier.c22 struct kref kref; member
42 kref_get(&n->kref); in cec_notifier_get_conn()
55 kref_init(&n->kref); in cec_notifier_get_conn()
63 static void cec_notifier_release(struct kref *kref) in cec_notifier_release() argument
66 container_of(kref, struct cec_notifier, kref); in cec_notifier_release()
76 kref_put(&n->kref, cec_notifier_release); in cec_notifier_put()
113 kref_get(&n->kref); in cec_notifier_register()
/Linux-v4.19/include/linux/ceph/
Dbuffer.h17 struct kref kref; member
23 extern void ceph_buffer_release(struct kref *kref);
27 kref_get(&b->kref); in ceph_buffer_get()
33 kref_put(&b->kref, ceph_buffer_release); in ceph_buffer_put()
Dstring_table.h11 struct kref kref; member
20 extern void ceph_release_string(struct kref *ref);
27 kref_get(&str->kref); in ceph_get_string()
35 kref_put(&str->kref, ceph_release_string); in ceph_put_string()
56 kref_get_unless_zero(&___str->kref)) \
/Linux-v4.19/security/integrity/
Ddigsig_asymmetric.c39 key_ref_t kref; in request_asymmetric_key() local
41 kref = keyring_search(make_key_ref(key, 1), in request_asymmetric_key()
43 if (!IS_ERR(kref)) { in request_asymmetric_key()
51 key_ref_t kref; in request_asymmetric_key() local
53 kref = keyring_search(make_key_ref(keyring, 1), in request_asymmetric_key()
55 if (IS_ERR(kref)) in request_asymmetric_key()
56 key = ERR_CAST(kref); in request_asymmetric_key()
58 key = key_ref_to_ptr(kref); in request_asymmetric_key()
/Linux-v4.19/arch/powerpc/platforms/cell/spufs/
Dgang.c36 kref_init(&gang->kref); in alloc_spu_gang()
46 static void destroy_spu_gang(struct kref *kref) in destroy_spu_gang() argument
49 gang = container_of(kref, struct spu_gang, kref); in destroy_spu_gang()
56 kref_get(&gang->kref); in get_spu_gang()
62 return kref_put(&gang->kref, &destroy_spu_gang); in put_spu_gang()
Dcontext.c52 kref_init(&ctx->kref); in alloc_spu_context()
82 void destroy_spu_context(struct kref *kref) in destroy_spu_context() argument
85 ctx = container_of(kref, struct spu_context, kref); in destroy_spu_context()
103 kref_get(&ctx->kref); in get_spu_context()
109 return kref_put(&ctx->kref, &destroy_spu_context); in put_spu_context()
/Linux-v4.19/drivers/gpu/drm/amd/display/dc/core/
Ddc_surface.c136 static void dc_plane_state_free(struct kref *kref) in dc_plane_state_free() argument
138 struct dc_plane_state *plane_state = container_of(kref, struct dc_plane_state, refcount); in dc_plane_state_free()
153 static void dc_gamma_free(struct kref *kref) in dc_gamma_free() argument
155 struct dc_gamma *gamma = container_of(kref, struct dc_gamma, refcount); in dc_gamma_free()
184 static void dc_transfer_func_free(struct kref *kref) in dc_transfer_func_free() argument
186 struct dc_transfer_func *tf = container_of(kref, struct dc_transfer_func, refcount); in dc_transfer_func_free()
/Linux-v4.19/drivers/infiniband/hw/cxgb3/
Diwch_cm.h58 __func__, __LINE__, ep, kref_read(&((ep)->kref))); \
59 WARN_ON(kref_read(&((ep)->kref)) < 1); \
60 kref_put(&((ep)->kref), __free_ep); \
65 __func__, __LINE__, ep, kref_read(&((ep)->kref))); \
66 kref_get(&((ep)->kref)); \
159 struct kref kref; member
225 void __free_ep(struct kref *kref);
/Linux-v4.19/drivers/gpu/drm/i915/
Di915_timeline.h78 struct kref kref; member
92 kref_get(&timeline->kref); in i915_timeline_get()
96 void __i915_timeline_free(struct kref *kref);
99 kref_put(&timeline->kref, __i915_timeline_free); in i915_timeline_put()
Di915_timeline.c88 kref_init(&timeline->kref); in i915_timeline_create()
93 void __i915_timeline_free(struct kref *kref) in __i915_timeline_free() argument
96 container_of(kref, typeof(*timeline), kref); in __i915_timeline_free()
/Linux-v4.19/drivers/gpu/drm/msm/
Dmsm_gem_vma.c23 msm_gem_address_space_destroy(struct kref *kref) in msm_gem_address_space_destroy() argument
25 struct msm_gem_address_space *aspace = container_of(kref, in msm_gem_address_space_destroy()
26 struct msm_gem_address_space, kref); in msm_gem_address_space_destroy()
38 kref_put(&aspace->kref, msm_gem_address_space_destroy); in msm_gem_address_space_put()
89 kref_get(&aspace->kref); in msm_gem_map_vma()
113 kref_init(&aspace->kref); in msm_gem_address_space_create()
/Linux-v4.19/drivers/gpu/drm/nouveau/nvkm/core/
Dmemory.c104 kref_init(&memory->kref); in nvkm_memory_ctor()
108 nvkm_memory_del(struct kref *kref) in nvkm_memory_del() argument
110 struct nvkm_memory *memory = container_of(kref, typeof(*memory), kref); in nvkm_memory_del()
123 kref_put(&memory->kref, nvkm_memory_del); in nvkm_memory_unref()
132 kref_get(&memory->kref); in nvkm_memory_ref()
/Linux-v4.19/drivers/acpi/
Dacpi_ipmi.c53 struct kref kref; member
96 struct kref kref; member
134 kref_init(&ipmi_device->kref); in ipmi_dev_alloc()
161 static void ipmi_dev_release_kref(struct kref *kref) in ipmi_dev_release_kref() argument
164 container_of(kref, struct acpi_ipmi_device, kref); in ipmi_dev_release_kref()
189 kref_get(&ipmi_device->kref); in acpi_ipmi_dev_get()
198 kref_put(&ipmi_device->kref, ipmi_dev_release_kref); in acpi_ipmi_dev_put()
216 kref_init(&ipmi_msg->kref); in ipmi_msg_alloc()
231 static void ipmi_msg_release_kref(struct kref *kref) in ipmi_msg_release_kref() argument
234 container_of(kref, struct acpi_ipmi_msg, kref); in ipmi_msg_release_kref()
[all …]
/Linux-v4.19/net/ceph/
Dbuffer.c26 kref_init(&b->kref); in ceph_buffer_new()
34 void ceph_buffer_release(struct kref *kref) in ceph_buffer_release() argument
36 struct ceph_buffer *b = container_of(kref, struct ceph_buffer, kref); in ceph_buffer_release()
/Linux-v4.19/drivers/infiniband/hw/cxgb4/
Diw_cxgb4.h112 struct kref kref; member
194 struct kref rqt_kref;
195 struct kref pbl_kref;
213 struct kref kref; member
216 void _c4iw_free_wr_wait(struct kref *kref);
221 kref_read(&wr_waitp->kref)); in c4iw_put_wr_wait()
222 WARN_ON(kref_read(&wr_waitp->kref) == 0); in c4iw_put_wr_wait()
223 kref_put(&wr_waitp->kref, _c4iw_free_wr_wait); in c4iw_put_wr_wait()
229 kref_read(&wr_waitp->kref)); in c4iw_get_wr_wait()
230 WARN_ON(kref_read(&wr_waitp->kref) == 0); in c4iw_get_wr_wait()
[all …]
/Linux-v4.19/include/drm/
Ddrm_syncobj.h42 struct kref refcount;
84 void drm_syncobj_free(struct kref *kref);
144 void drm_syncobj_free(struct kref *kref);
/Linux-v4.19/net/batman-adv/
Dtypes.h194 struct kref refcount;
261 struct kref refcount;
331 struct kref refcount;
482 struct kref refcount;
557 struct kref refcount;
616 struct kref refcount;
651 struct kref refcount;
720 struct kref refcount;
1438 struct kref refcount;
1469 struct kref refcount;
[all …]
/Linux-v4.19/drivers/hid/
Dhid-cougar.c71 struct kref kref; member
124 kref_get(&shared->kref); in cougar_get_shared_data()
131 static void cougar_release_shared_data(struct kref *kref) in cougar_release_shared_data() argument
133 struct cougar_shared *shared = container_of(kref, in cougar_release_shared_data()
134 struct cougar_shared, kref); in cougar_release_shared_data()
148 kref_put(&cougar->shared->kref, cougar_release_shared_data); in cougar_remove_shared_data()
172 kref_init(&shared->kref); in cougar_bind_shared_data()
/Linux-v4.19/drivers/usb/misc/
Dusblcd.c54 struct kref kref; member
61 #define to_lcd_dev(d) container_of(d, struct usb_lcd, kref)
68 static void lcd_delete(struct kref *kref) in lcd_delete() argument
70 struct usb_lcd *dev = to_lcd_dev(kref); in lcd_delete()
104 kref_get(&dev->kref); in lcd_open()
110 kref_put(&dev->kref, lcd_delete); in lcd_open()
132 kref_put(&dev->kref, lcd_delete); in lcd_release()
326 kref_init(&dev->kref); in lcd_probe()
384 kref_put(&dev->kref, lcd_delete); in lcd_probe()
426 kref_put(&dev->kref, lcd_delete); in lcd_disconnect()
/Linux-v4.19/drivers/usb/core/
Dfile.c61 struct kref kref; member
80 kref_get(&usb_class->kref); in init_usb_class()
90 kref_init(&usb_class->kref); in init_usb_class()
105 static void release_usb_class(struct kref *kref) in release_usb_class() argument
116 kref_put(&usb_class->kref, release_usb_class); in destroy_usb_class()
/Linux-v4.19/drivers/misc/vmw_vmci/
Dvmci_resource.c131 kref_init(&resource->kref); in vmci_resource_add()
192 kref_get(&resource->kref); in vmci_resource_get()
197 static void vmci_release_resource(struct kref *kref) in vmci_release_resource() argument
200 container_of(kref, struct vmci_resource, kref); in vmci_release_resource()
221 return kref_put(&resource->kref, vmci_release_resource) ? in vmci_resource_put()
/Linux-v4.19/kernel/time/
Dposix-clock.c30 static void delete_clock(struct kref *kref);
141 kref_get(&clk->kref); in posix_clock_open()
157 kref_put(&clk->kref, delete_clock); in posix_clock_release()
181 kref_init(&clk->kref); in posix_clock_register()
192 static void delete_clock(struct kref *kref) in delete_clock() argument
194 struct posix_clock *clk = container_of(kref, struct posix_clock, kref); in delete_clock()
208 kref_put(&clk->kref, delete_clock); in posix_clock_unregister()

12345678910>>...25