Home
last modified time | relevance | path

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

12345678910>>...30

/kernel/linux/linux-5.10/include/linux/
Dkref.h19 struct kref { struct
29 static inline void kref_init(struct kref *kref) in kref_init() argument
31 refcount_set(&kref->refcount, 1); in kref_init()
34 static inline unsigned int kref_read(const struct kref *kref) in kref_read() argument
36 return refcount_read(&kref->refcount); in kref_read()
43 static inline void kref_get(struct kref *kref) in kref_get() argument
45 refcount_inc(&kref->refcount); in kref_get()
62 static inline int kref_put(struct kref *kref, void (*release)(struct kref *kref)) in kref_put() argument
64 if (refcount_dec_and_test(&kref->refcount)) { in kref_put()
65 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()
Dtime_namespace.h21 struct kref kref; member
40 kref_get(&ns->kref); in get_time_ns()
47 void free_time_ns(struct kref *kref);
53 kref_put(&ns->kref, free_time_ns); in put_time_ns()
/kernel/linux/linux-5.10/drivers/target/iscsi/cxgbit/
Dcxgbit.h140 struct kref kref; member
185 struct kref kref; member
211 struct kref kref; member
244 void _cxgbit_free_cdev(struct kref *kref);
245 void _cxgbit_free_csk(struct kref *kref);
246 void _cxgbit_free_cnp(struct kref *kref);
250 kref_get(&cdev->kref); in cxgbit_get_cdev()
255 kref_put(&cdev->kref, _cxgbit_free_cdev); in cxgbit_put_cdev()
260 kref_get(&csk->kref); in cxgbit_get_csk()
265 kref_put(&csk->kref, _cxgbit_free_csk); in cxgbit_put_csk()
[all …]
/kernel/linux/linux-5.10/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()
34 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)) \
/kernel/linux/linux-5.10/arch/powerpc/platforms/cell/spufs/
Dgang.c23 kref_init(&gang->kref); in alloc_spu_gang()
33 static void destroy_spu_gang(struct kref *kref) in destroy_spu_gang() argument
36 gang = container_of(kref, struct spu_gang, kref); in destroy_spu_gang()
43 kref_get(&gang->kref); in get_spu_gang()
49 return kref_put(&gang->kref, &destroy_spu_gang); in put_spu_gang()
Dcontext.c39 kref_init(&ctx->kref); in alloc_spu_context()
69 void destroy_spu_context(struct kref *kref) in destroy_spu_context() argument
72 ctx = container_of(kref, struct spu_context, kref); in destroy_spu_context()
90 kref_get(&ctx->kref); in get_spu_context()
96 return kref_put(&ctx->kref, &destroy_spu_context); in put_spu_context()
/kernel/linux/linux-5.10/drivers/gpu/drm/amd/display/dc/core/
Ddc_surface.c180 static void dc_plane_state_free(struct kref *kref) in dc_plane_state_free() argument
182 struct dc_plane_state *plane_state = container_of(kref, struct dc_plane_state, refcount); in dc_plane_state_free()
197 static void dc_gamma_free(struct kref *kref) in dc_gamma_free() argument
199 struct dc_gamma *gamma = container_of(kref, struct dc_gamma, refcount); in dc_gamma_free()
228 static void dc_transfer_func_free(struct kref *kref) in dc_transfer_func_free() argument
230 struct dc_transfer_func *tf = container_of(kref, struct dc_transfer_func, refcount); in dc_transfer_func_free()
254 static void dc_3dlut_func_free(struct kref *kref) in dc_3dlut_func_free() argument
256 struct dc_3dlut *lut = container_of(kref, struct dc_3dlut, refcount); in dc_3dlut_func_free()
/kernel/linux/linux-5.10/security/integrity/
Ddigsig_asymmetric.c33 key_ref_t kref; in request_asymmetric_key() local
35 kref = keyring_search(make_key_ref(key, 1), in request_asymmetric_key()
37 if (!IS_ERR(kref)) { in request_asymmetric_key()
45 key_ref_t kref; in request_asymmetric_key() local
47 kref = keyring_search(make_key_ref(keyring, 1), in request_asymmetric_key()
49 if (IS_ERR(kref)) in request_asymmetric_key()
50 key = ERR_CAST(kref); in request_asymmetric_key()
52 key = key_ref_to_ptr(kref); in request_asymmetric_key()
/kernel/linux/linux-5.10/drivers/gpu/drm/msm/
Dmsm_gem_vma.c12 msm_gem_address_space_destroy(struct kref *kref) in msm_gem_address_space_destroy() argument
14 struct msm_gem_address_space *aspace = container_of(kref, in msm_gem_address_space_destroy()
15 struct msm_gem_address_space, kref); in msm_gem_address_space_destroy()
28 kref_put(&aspace->kref, msm_gem_address_space_destroy); in msm_gem_address_space_put()
35 kref_get(&aspace->kref); in msm_gem_address_space_get()
137 kref_get(&aspace->kref); in msm_gem_init_vma()
161 kref_init(&aspace->kref); in msm_gem_address_space_create()
/kernel/linux/linux-5.10/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()
/kernel/linux/linux-5.10/drivers/acpi/
Dacpi_ipmi.c40 struct kref kref; member
83 struct kref kref; member
121 kref_init(&ipmi_device->kref); in ipmi_dev_alloc()
148 static void ipmi_dev_release_kref(struct kref *kref) in ipmi_dev_release_kref() argument
151 container_of(kref, struct acpi_ipmi_device, kref); in ipmi_dev_release_kref()
176 kref_get(&ipmi_device->kref); in acpi_ipmi_dev_get()
185 kref_put(&ipmi_device->kref, ipmi_dev_release_kref); in acpi_ipmi_dev_put()
203 kref_init(&ipmi_msg->kref); in ipmi_msg_alloc()
218 static void ipmi_msg_release_kref(struct kref *kref) in ipmi_msg_release_kref() argument
221 container_of(kref, struct acpi_ipmi_msg, kref); in ipmi_msg_release_kref()
[all …]
/kernel/linux/linux-5.10/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()
/kernel/linux/linux-5.10/include/drm/
Ddrm_syncobj.h43 struct kref refcount;
66 void drm_syncobj_free(struct kref *kref);
125 void drm_syncobj_free(struct kref *kref);
/kernel/linux/linux-5.10/drivers/media/cec/core/
Dcec-notifier.c23 struct kref kref; member
59 kref_get(&n->kref); in cec_notifier_get_conn()
79 kref_init(&n->kref); in cec_notifier_get_conn()
86 static void cec_notifier_release(struct kref *kref) in cec_notifier_release() argument
89 container_of(kref, struct cec_notifier, kref); in cec_notifier_release()
99 kref_put(&n->kref, cec_notifier_release); in cec_notifier_put()
/kernel/linux/linux-5.10/net/batman-adv/
Dtypes.h194 struct kref refcount;
284 struct kref refcount;
354 struct kref refcount;
507 struct kref refcount;
582 struct kref refcount;
641 struct kref refcount;
676 struct kref refcount;
745 struct kref refcount;
1499 struct kref refcount;
1530 struct kref refcount;
[all …]
Doriginator.h25 void batadv_orig_node_release(struct kref *ref);
31 void batadv_hardif_neigh_release(struct kref *ref);
36 void batadv_neigh_node_release(struct kref *ref);
46 void batadv_neigh_ifinfo_release(struct kref *ref);
57 void batadv_orig_ifinfo_release(struct kref *ref);
68 void batadv_orig_node_vlan_release(struct kref *ref);
/kernel/linux/linux-5.10/include/net/
Dtls_toe.h68 void (*release)(struct kref *kref);
69 struct kref kref; member
/kernel/linux/linux-5.10/arch/s390/pci/
Dpci_bus.h13 void zpci_release_device(struct kref *kref);
17 kref_put(&zdev->kref, zpci_release_device); in zpci_zdev_put()
22 kref_get(&zdev->kref); in zpci_zdev_get()
/kernel/linux/linux-5.10/drivers/usb/misc/
Dusblcd.c51 struct kref kref; member
60 #define to_lcd_dev(d) container_of(d, struct usb_lcd, kref)
67 static void lcd_delete(struct kref *kref) in lcd_delete() argument
69 struct usb_lcd *dev = to_lcd_dev(kref); in lcd_delete()
95 kref_get(&dev->kref); in lcd_open()
100 kref_put(&dev->kref, lcd_delete); in lcd_open()
120 kref_put(&dev->kref, lcd_delete); in lcd_release()
330 kref_init(&dev->kref); in lcd_probe()
388 kref_put(&dev->kref, lcd_delete); in lcd_probe()
431 kref_put(&dev->kref, lcd_delete); in lcd_disconnect()
/kernel/linux/linux-5.10/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()
/kernel/linux/linux-5.10/drivers/misc/vmw_vmci/
Dvmci_resource.c124 kref_init(&resource->kref); in vmci_resource_add()
185 kref_get(&resource->kref); in vmci_resource_get()
190 static void vmci_release_resource(struct kref *kref) in vmci_release_resource() argument
193 container_of(kref, struct vmci_resource, kref); in vmci_release_resource()
214 return kref_put(&resource->kref, vmci_release_resource) ? in vmci_resource_put()
/kernel/linux/linux-5.10/drivers/hid/
Dhid-cougar.c70 struct kref kref; member
126 kref_get(&shared->kref); in cougar_get_shared_data()
133 static void cougar_release_shared_data(struct kref *kref) in cougar_release_shared_data() argument
135 struct cougar_shared *shared = container_of(kref, in cougar_release_shared_data()
136 struct cougar_shared, kref); in cougar_release_shared_data()
150 kref_put(&cougar->shared->kref, cougar_release_shared_data); in cougar_remove_shared_data()
175 kref_init(&shared->kref); in cougar_bind_shared_data()
/kernel/linux/linux-5.10/kernel/sched/
Dautogroup.c15 kref_init(&autogroup_default.kref); in autogroup_init()
25 static inline void autogroup_destroy(struct kref *kref) in autogroup_destroy() argument
27 struct autogroup *ag = container_of(kref, struct autogroup, kref); in autogroup_destroy()
40 kref_put(&ag->kref, autogroup_destroy); in autogroup_kref_put()
45 kref_get(&ag->kref); in autogroup_kref_get()
75 kref_init(&ag->kref); in autogroup_create()

12345678910>>...30