/linux-4.4.14/include/linux/ |
D | kref.h | 23 struct kref { struct 31 static inline void kref_init(struct kref *kref) in kref_init() argument 33 atomic_set(&kref->refcount, 1); in kref_init() 40 static inline void kref_get(struct kref *kref) in kref_get() argument 46 WARN_ON_ONCE(atomic_inc_return(&kref->refcount) < 2); in kref_get() 67 static inline int kref_sub(struct kref *kref, unsigned int count, in kref_sub() argument 68 void (*release)(struct kref *kref)) in kref_sub() argument 72 if (atomic_sub_and_test((int) count, &kref->refcount)) { in kref_sub() 73 release(kref); in kref_sub() 96 static inline int kref_put(struct kref *kref, void (*release)(struct kref *kref)) in kref_put() argument [all …]
|
D | utsname.h | 24 struct kref kref; member 34 kref_get(&ns->kref); in get_uts_ns() 39 extern void free_uts_ns(struct kref *kref); 43 kref_put(&ns->kref, free_uts_ns); in put_uts_ns()
|
D | pid_namespace.h | 25 struct kref kref; member 58 kref_get(&ns->kref); in get_pid_ns()
|
D | relay.h | 42 struct kref kref; /* channel buffer refcount */ member 63 struct kref kref; /* channel refcount */ member
|
D | firewire.h | 85 struct kref kref; member 140 kref_get(&card->kref); in fw_card_get() 145 void fw_card_release(struct kref *kref); 149 kref_put(&card->kref, fw_card_release); in fw_card_put()
|
D | tty_driver.h | 298 struct kref kref; /* Reference management */ member 359 kref_get(&d->kref); in tty_driver_kref_get()
|
D | fence.h | 73 struct kref refcount; 181 void fence_release(struct kref *kref);
|
D | posix-clock.h | 120 struct kref kref; member
|
D | tty.h | 242 struct kref kref; /* Ref counter */ member 261 struct kref kref; member 417 kref_get(&tty->kref); in tty_kref_get() 546 if (port && kref_get_unless_zero(&port->kref)) in tty_port_get()
|
D | kobject.h | 70 struct kref kref; member
|
D | bsg.h | 13 struct kref ref;
|
D | interrupt.h | 218 struct kref kref; member 221 void (*release)(struct kref *ref);
|
D | hw_random.h | 49 struct kref ref;
|
D | cpu_rmap.h | 28 struct kref refcount;
|
D | dmaengine.h | 425 void dma_chan_cleanup(struct kref *kref); 448 struct kref kref; member 492 kref_get(&unmap->kref); in dma_set_unmap()
|
D | klist.h | 42 struct kref n_ref;
|
/linux-4.4.14/include/linux/ceph/ |
D | buffer.h | 16 struct kref kref; member 22 extern void ceph_buffer_release(struct kref *kref); 26 kref_get(&b->kref); in ceph_buffer_get() 32 kref_put(&b->kref, ceph_buffer_release); in ceph_buffer_put()
|
D | mon_client.h | 48 struct kref kref; member
|
D | osd_client.h | 157 struct kref r_kref; 191 struct kref kref; member
|
D | messenger.h | 160 struct kref kref; member
|
/linux-4.4.14/arch/powerpc/platforms/cell/spufs/ |
D | gang.c | 36 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()
|
D | context.c | 50 kref_init(&ctx->kref); in alloc_spu_context() 80 void destroy_spu_context(struct kref *kref) in destroy_spu_context() argument 83 ctx = container_of(kref, struct spu_context, kref); in destroy_spu_context() 101 kref_get(&ctx->kref); in get_spu_context() 107 return kref_put(&ctx->kref, &destroy_spu_context); in put_spu_context()
|
D | spufs.h | 99 struct kref kref; member 116 struct kref *prof_priv_kref; 117 void ( * prof_priv_release) (struct kref *kref); 160 struct kref kref; member 286 void destroy_spu_context(struct kref *kref);
|
/linux-4.4.14/drivers/infiniband/hw/cxgb3/ |
D | iwch_cm.h | 58 ep, atomic_read(&((ep)->kref.refcount))); \ 59 WARN_ON(atomic_read(&((ep)->kref.refcount)) < 1); \ 60 kref_put(&((ep)->kref), __free_ep); \ 65 ep, atomic_read(&((ep)->kref.refcount))); \ 66 kref_get(&((ep)->kref)); \ 159 struct kref kref; member 225 void __free_ep(struct kref *kref);
|
/linux-4.4.14/drivers/acpi/ |
D | acpi_ipmi.c | 53 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 …]
|
D | nfit.h | 159 struct kref kref; member 164 static inline struct nfit_spa_mapping *to_spa_map(struct kref *kref) in to_spa_map() argument 166 return container_of(kref, struct nfit_spa_mapping, kref); in to_spa_map()
|
D | ec.c | 149 struct kref kref; member 944 kref_get(&handler->kref); in acpi_ec_get_query_handler() 965 static void acpi_ec_query_handler_release(struct kref *kref) in acpi_ec_query_handler_release() argument 968 container_of(kref, struct acpi_ec_query_handler, kref); in acpi_ec_query_handler_release() 975 kref_put(&handler->kref, acpi_ec_query_handler_release); in acpi_ec_put_query_handler() 993 kref_init(&handler->kref); in acpi_ec_add_query_handler()
|
/linux-4.4.14/net/ceph/ |
D | buffer.c | 25 kref_init(&b->kref); in ceph_buffer_new() 33 void ceph_buffer_release(struct kref *kref) in ceph_buffer_release() argument 35 struct ceph_buffer *b = container_of(kref, struct ceph_buffer, kref); in ceph_buffer_release()
|
D | mon_client.c | 471 static void release_generic_request(struct kref *kref) in release_generic_request() argument 474 container_of(kref, struct ceph_mon_generic_request, kref); in release_generic_request() 486 kref_put(&req->kref, release_generic_request); in put_generic_request() 491 kref_get(&req->kref); in get_generic_request() 605 kref_init(&req->kref); in ceph_monc_do_statfs() 686 kref_init(&req->kref); in ceph_monc_do_get_version()
|
D | msgpool.c | 81 kref_init(&msg->kref); /* retake single ref */ in ceph_msgpool_put()
|
/linux-4.4.14/drivers/watchdog/ |
D | da9055_wdt.c | 38 struct kref kref; member 102 static void da9055_wdt_release_resources(struct kref *r) in da9055_wdt_release_resources() 110 kref_get(&driver_data->kref); in da9055_wdt_ref() 117 kref_put(&driver_data->kref, da9055_wdt_release_resources); in da9055_wdt_unref() 168 kref_init(&driver_data->kref); in da9055_wdt_probe() 192 kref_put(&driver_data->kref, da9055_wdt_release_resources); in da9055_wdt_remove()
|
D | da9052_wdt.c | 34 struct kref kref; member 54 static void da9052_wdt_release_resources(struct kref *r) in da9052_wdt_release_resources() 111 kref_get(&driver_data->kref); in da9052_wdt_ref() 118 kref_put(&driver_data->kref, da9052_wdt_release_resources); in da9052_wdt_unref() 201 kref_init(&driver_data->kref); in da9052_wdt_probe() 228 kref_put(&driver_data->kref, da9052_wdt_release_resources); in da9052_wdt_remove()
|
/linux-4.4.14/kernel/sched/ |
D | auto_group.c | 17 kref_init(&autogroup_default.kref); in autogroup_init() 27 static inline void autogroup_destroy(struct kref *kref) in autogroup_destroy() argument 29 struct autogroup *ag = container_of(kref, struct autogroup, kref); in autogroup_destroy() 42 kref_put(&ag->kref, autogroup_destroy); in autogroup_kref_put() 47 kref_get(&ag->kref); in autogroup_kref_get() 78 kref_init(&ag->kref); in autogroup_create()
|
D | auto_group.h | 12 struct kref kref; member
|
/linux-4.4.14/drivers/gpu/drm/ttm/ |
D | ttm_object.c | 74 struct kref refcount; 124 struct kref kref; member 139 static void ttm_object_file_destroy(struct kref *kref) in ttm_object_file_destroy() argument 142 container_of(kref, struct ttm_object_file, refcount); in ttm_object_file_destroy() 198 static void ttm_release_base(struct kref *kref) in ttm_release_base() argument 201 container_of(kref, struct ttm_base_object, refcount); in ttm_release_base() 307 if (unlikely(atomic_read(&ref->kref.refcount) == 0)) in ttm_ref_object_exists() 341 if (kref_get_unless_zero(&ref->kref)) { in ttm_ref_object_add() 362 kref_init(&ref->kref); in ttm_ref_object_add() 387 static void ttm_ref_object_release(struct kref *kref) in ttm_ref_object_release() argument [all …]
|
D | ttm_bo.c | 136 static void ttm_bo_release_list(struct kref *list_kref) in ttm_bo_release_list() 144 BUG_ON(atomic_read(&bo->kref.refcount)); in ttm_bo_release_list() 208 static void ttm_bo_ref_bug(struct kref *list_kref) in ttm_bo_ref_bug() 621 static void ttm_bo_release(struct kref *kref) in ttm_bo_release() argument 624 container_of(kref, struct ttm_buffer_object, kref); in ttm_bo_release() 641 kref_put(&bo->kref, ttm_bo_release); in ttm_bo_unref() 1119 kref_init(&bo->kref); in ttm_bo_init()
|
/linux-4.4.14/drivers/misc/vmw_vmci/ |
D | vmci_resource.c | 130 kref_init(&resource->kref); in vmci_resource_add() 191 kref_get(&resource->kref); in vmci_resource_get() 196 static void vmci_release_resource(struct kref *kref) in vmci_release_resource() argument 199 container_of(kref, struct vmci_resource, kref); in vmci_release_resource() 220 return kref_put(&resource->kref, vmci_release_resource) ? in vmci_resource_put()
|
D | vmci_resource.h | 39 struct kref kref; member
|
D | vmci_context.h | 51 struct kref kref; member
|
D | vmci_context.c | 118 kref_init(&context->kref); in vmci_ctx_create() 411 kref_get(&context->kref); in vmci_ctx_get() 425 static void ctx_free_ctx(struct kref *kref) in ctx_free_ctx() argument 427 struct vmci_ctx *context = container_of(kref, struct vmci_ctx, kref); in ctx_free_ctx() 498 kref_put(&context->kref, ctx_free_ctx); in vmci_ctx_put()
|
/linux-4.4.14/drivers/misc/ibmasm/ |
D | ibmasm.h | 96 struct kref kref; member 99 #define to_command(c) container_of(c, struct command, kref) 101 void ibmasm_free_command(struct kref *kref); 108 kref_put(&cmd->kref, ibmasm_free_command); in command_put() 114 kref_get(&cmd->kref); in command_get()
|
D | command.c | 53 kref_init(&cmd->kref); in ibmasm_new_command() 66 void ibmasm_free_command(struct kref *kref) in ibmasm_free_command() argument 68 struct command *cmd = to_command(kref); in ibmasm_free_command()
|
/linux-4.4.14/drivers/usb/core/ |
D | file.c | 57 struct kref kref; member 76 kref_get(&usb_class->kref); in init_usb_class() 86 kref_init(&usb_class->kref); in init_usb_class() 101 static void release_usb_class(struct kref *kref) in release_usb_class() argument 112 kref_put(&usb_class->kref, release_usb_class); in destroy_usb_class()
|
D | urb.c | 11 #define to_urb(d) container_of(d, struct urb, kref) 14 static void urb_destroy(struct kref *kref) in urb_destroy() argument 16 struct urb *urb = to_urb(kref); in urb_destroy() 42 kref_init(&urb->kref); in usb_init_urb() 93 kref_put(&urb->kref, urb_destroy); in usb_free_urb() 110 kref_get(&urb->kref); in usb_get_urb()
|
D | hub.h | 30 struct kref kref; member
|
/linux-4.4.14/drivers/usb/misc/ |
D | usblcd.c | 53 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() 103 kref_get(&dev->kref); in lcd_open() 109 kref_put(&dev->kref, lcd_delete); in lcd_open() 131 kref_put(&dev->kref, lcd_delete); in lcd_release() 328 kref_init(&dev->kref); in lcd_probe() 399 kref_put(&dev->kref, lcd_delete); in lcd_probe() 441 kref_put(&dev->kref, lcd_delete); in lcd_disconnect()
|
D | yurex.c | 65 struct kref kref; member 73 #define to_yurex_dev(d) container_of(d, struct usb_yurex, kref) 93 static void yurex_delete(struct kref *kref) in yurex_delete() argument 95 struct usb_yurex *dev = to_yurex_dev(kref); in yurex_delete() 207 kref_init(&dev->kref); in yurex_probe() 319 kref_put(&dev->kref, yurex_delete); in yurex_probe() 344 kref_put(&dev->kref, yurex_delete); in yurex_disconnect() 389 kref_get(&dev->kref); in yurex_open() 409 kref_put(&dev->kref, yurex_delete); in yurex_release()
|
D | uss720.c | 66 struct kref ref_count; 74 struct kref ref_count; 84 static void destroy_priv(struct kref *kref) in destroy_priv() argument 86 struct parport_uss720_private *priv = container_of(kref, struct parport_uss720_private, ref_count); in destroy_priv() 93 static void destroy_async(struct kref *kref) in destroy_async() argument 95 struct uss720_async_request *rq = container_of(kref, struct uss720_async_request, ref_count); in destroy_async()
|
D | ftdi-elan.c | 189 struct kref kref; member 196 #define kref_to_usb_ftdi(d) container_of(d, struct usb_ftdi, kref) 200 static void ftdi_elan_delete(struct kref *kref) in ftdi_elan_delete() argument 202 struct usb_ftdi *ftdi = kref_to_usb_ftdi(kref); in ftdi_elan_delete() 216 kref_put(&ftdi->kref, ftdi_elan_delete); in ftdi_elan_put_kref() 221 kref_get(&ftdi->kref); in ftdi_elan_get_kref() 226 kref_init(&ftdi->kref); in ftdi_elan_init_kref() 232 kref_put(&ftdi->kref, ftdi_elan_delete); in ftdi_status_requeue_work() 238 kref_get(&ftdi->kref); in ftdi_status_queue_work() 244 kref_put(&ftdi->kref, ftdi_elan_delete); in ftdi_status_cancel_work() [all …]
|
/linux-4.4.14/security/integrity/ |
D | digsig_asymmetric.c | 37 key_ref_t kref; in request_asymmetric_key() local 38 kref = keyring_search(make_key_ref(keyring, 1), in request_asymmetric_key() 40 if (IS_ERR(kref)) in request_asymmetric_key() 41 key = ERR_CAST(kref); in request_asymmetric_key() 43 key = key_ref_to_ptr(kref); in request_asymmetric_key()
|
/linux-4.4.14/security/apparmor/include/ |
D | policy.h | 155 struct kref count; 200 struct kref count; 236 void aa_free_namespace_kref(struct kref *kref); 242 void aa_free_replacedby_kref(struct kref *kref); 246 void aa_free_profile_kref(struct kref *kref);
|
D | apparmor.h | 81 static inline int kref_get_not0(struct kref *kref) in kref_get_not0() argument 83 return atomic_inc_not_zero(&kref->refcount); in kref_get_not0()
|
D | match.h | 97 struct kref count; 127 void aa_dfa_free_kref(struct kref *kref);
|
/linux-4.4.14/drivers/scsi/isci/ |
D | remote_device.h | 92 struct kref kref; member 116 kref_get(&idev->kref); in isci_get_device() 125 kref_get(&idev->kref); in isci_lookup_device() 132 void isci_remote_device_release(struct kref *kref); 136 kref_put(&idev->kref, isci_remote_device_release); in isci_put_device()
|
/linux-4.4.14/drivers/input/serio/ |
D | serio_raw.c | 36 struct kref kref; member 107 kref_get(&serio_raw->kref); in serio_raw_open() 118 static void serio_raw_free(struct kref *kref) in serio_raw_free() argument 121 container_of(kref, struct serio_raw, kref); in serio_raw_free() 138 kref_put(&serio_raw->kref, serio_raw_free); in serio_raw_release() 307 kref_init(&serio_raw->kref); in serio_raw_connect() 355 kref_put(&serio_raw->kref, serio_raw_free); in serio_raw_connect() 408 kref_put(&serio_raw->kref, serio_raw_free); in serio_raw_disconnect()
|
/linux-4.4.14/kernel/ |
D | utsname.c | 26 kref_init(&uts_ns->kref); in create_uts_ns() 83 void free_uts_ns(struct kref *kref) in free_uts_ns() argument 87 ns = container_of(kref, struct uts_namespace, kref); in free_uts_ns()
|
D | relay.c | 181 kref_get(&buf->chan->kref); in relay_create_buf() 196 static void relay_destroy_channel(struct kref *kref) in relay_destroy_channel() argument 198 struct rchan *chan = container_of(kref, struct rchan, kref); in relay_destroy_channel() 220 kref_put(&chan->kref, relay_destroy_channel); in relay_destroy_buf() 231 static void relay_remove_buf(struct kref *kref) in relay_remove_buf() argument 233 struct rchan_buf *buf = container_of(kref, struct rchan_buf, kref); in relay_remove_buf() 354 kref_init(&buf->kref); in __relay_reset() 484 kref_put(&buf->kref, relay_remove_buf); in relay_close_buf() 596 kref_init(&chan->kref); in relay_open() 615 kref_put(&chan->kref, relay_destroy_channel); in relay_open() [all …]
|
D | pid_namespace.c | 113 kref_init(&ns->kref); in create_pid_namespace() 163 static void free_pid_ns(struct kref *kref) in free_pid_ns() argument 167 ns = container_of(kref, struct pid_namespace, kref); in free_pid_ns() 177 if (!kref_put(&ns->kref, free_pid_ns)) in put_pid_ns()
|
/linux-4.4.14/Documentation/ |
D | kref.txt | 7 To use a kref, add one to your data structures like: 13 struct kref refcount; 18 The kref can occur anywhere within the data structure. 20 You must initialize the kref after you allocate it. To do this, call 30 This sets the refcount in the kref to 1. 32 Once you have an initialized kref, you must follow the following 39 If you already have a valid pointer to a kref-ed structure (the 46 a valid pointer to a kref-ed structure without already 50 3) If the code attempts to gain a reference to a kref-ed structure 58 void data_release(struct kref *ref) [all …]
|
/linux-4.4.14/fs/ |
D | eventfd.c | 26 struct kref kref; member 75 static void eventfd_free(struct kref *kref) in eventfd_free() argument 77 struct eventfd_ctx *ctx = container_of(kref, struct eventfd_ctx, kref); in eventfd_free() 90 kref_get(&ctx->kref); in eventfd_ctx_get() 104 kref_put(&ctx->kref, eventfd_free); in eventfd_ctx_put() 407 kref_init(&ctx->kref); in eventfd_file_create()
|
/linux-4.4.14/drivers/infiniband/core/ |
D | iwpm_util.h | 73 struct kref kref; member 114 void iwpm_free_nlmsg_request(struct kref *kref);
|
D | iwpm_util.c | 319 kref_init(&nlmsg_request->kref); in iwpm_get_nlmsg_request() 320 kref_get(&nlmsg_request->kref); in iwpm_get_nlmsg_request() 328 void iwpm_free_nlmsg_request(struct kref *kref) in iwpm_free_nlmsg_request() argument 333 nlmsg_request = container_of(kref, struct iwpm_nlmsg_request, kref); in iwpm_free_nlmsg_request() 356 kref_get(&nlmsg_request->kref); in iwpm_find_nlmsg_request() 378 kref_put(&nlmsg_request->kref, iwpm_free_nlmsg_request); in iwpm_wait_complete_req()
|
D | iwpm_msg.c | 122 iwpm_free_nlmsg_request(&nlmsg_request->kref); in iwpm_register_pid() 191 iwpm_free_nlmsg_request(&nlmsg_request->kref); in iwpm_add_mapping() 267 iwpm_free_nlmsg_request(&nlmsg_request->kref); in iwpm_add_and_query_mapping() 395 kref_put(&nlmsg_request->kref, iwpm_free_nlmsg_request); in iwpm_register_pid_cb() 464 kref_put(&nlmsg_request->kref, iwpm_free_nlmsg_request); in iwpm_add_mapping_cb() 556 kref_put(&nlmsg_request->kref, iwpm_free_nlmsg_request); in iwpm_add_and_query_mapping_cb() 750 kref_put(&nlmsg_request->kref, iwpm_free_nlmsg_request); in iwpm_mapping_error_cb()
|
D | uverbs.h | 105 struct kref ref; 117 struct kref ref;
|
/linux-4.4.14/drivers/vfio/ |
D | vfio.c | 60 struct kref kref; member 73 struct kref kref; member 90 struct kref kref; member 172 kref_get(&container->kref); in vfio_container_get() 175 static void vfio_container_release(struct kref *kref) in vfio_container_release() argument 178 container = container_of(kref, struct vfio_container, kref); in vfio_container_release() 185 kref_put(&container->kref, vfio_container_release); in vfio_container_put() 212 kref_init(&group->kref); in vfio_create_group() 273 static void vfio_group_release(struct kref *kref) in vfio_group_release() argument 275 struct vfio_group *group = container_of(kref, struct vfio_group, kref); in vfio_group_release() [all …]
|
/linux-4.4.14/net/rxrpc/ |
D | ar-security.c | 169 key_ref_t kref; in rxrpc_init_server_conn_security() local 204 kref = keyring_search(make_key_ref(rx->securities, 1UL), in rxrpc_init_server_conn_security() 206 if (IS_ERR(kref)) { in rxrpc_init_server_conn_security() 209 _leave(" = %ld [search]", PTR_ERR(kref)); in rxrpc_init_server_conn_security() 210 return PTR_ERR(kref); in rxrpc_init_server_conn_security() 213 key = key_ref_to_ptr(kref); in rxrpc_init_server_conn_security()
|
/linux-4.4.14/fs/configfs/ |
D | item.c | 44 static void config_item_release(struct kref *kref); 159 static void config_item_release(struct kref *kref) in config_item_release() argument 161 config_item_cleanup(container_of(kref, struct config_item, ci_kref)); in config_item_release()
|
/linux-4.4.14/arch/powerpc/platforms/cell/ |
D | spu_notify.c | 55 struct kref *prof_info_kref, in spu_set_profile_private_kref() 56 void (* prof_info_release) (struct kref *kref)) in spu_set_profile_private_kref()
|
/linux-4.4.14/kernel/time/ |
D | posix-clock.c | 28 static void delete_clock(struct kref *kref); 171 kref_get(&clk->kref); in posix_clock_open() 187 kref_put(&clk->kref, delete_clock); in posix_clock_release() 213 kref_init(&clk->kref); in posix_clock_register() 224 static void delete_clock(struct kref *kref) in delete_clock() argument 226 struct posix_clock *clk = container_of(kref, struct posix_clock, kref); in delete_clock() 240 kref_put(&clk->kref, delete_clock); in posix_clock_unregister()
|
/linux-4.4.14/net/tipc/ |
D | subscr.c | 49 struct kref kref; member 136 static void tipc_subscrb_kref_release(struct kref *kref) in tipc_subscrb_kref_release() argument 138 struct tipc_subscriber *subcriber = container_of(kref, in tipc_subscrb_kref_release() 139 struct tipc_subscriber, kref); in tipc_subscrb_kref_release() 146 kref_put(&subscriber->kref, tipc_subscrb_kref_release); in tipc_subscrb_put() 151 kref_get(&subscriber->kref); in tipc_subscrb_get() 163 kref_init(&subscriber->kref); in tipc_subscrb_create()
|
D | server.c | 66 struct kref kref; member 90 static void tipc_conn_kref_release(struct kref *kref) in tipc_conn_kref_release() argument 92 struct tipc_conn *con = container_of(kref, struct tipc_conn, kref); in tipc_conn_kref_release() 115 kref_put(&con->kref, tipc_conn_kref_release); in conn_put() 120 kref_get(&con->kref); in conn_get() 223 kref_init(&con->kref); in tipc_alloc_conn()
|
D | node.h | 110 struct kref kref; member
|
D | node.c | 103 static void tipc_node_kref_release(struct kref *kref) in tipc_node_kref_release() argument 105 struct tipc_node *node = container_of(kref, struct tipc_node, kref); in tipc_node_kref_release() 112 kref_put(&node->kref, tipc_node_kref_release); in tipc_node_put() 117 kref_get(&node->kref); in tipc_node_get() 161 kref_init(&n_ptr->kref); in tipc_node_create()
|
/linux-4.4.14/drivers/uwb/ |
D | neh.c | 104 struct kref kref; member 120 static void uwb_rc_neh_release(struct kref *kref) in uwb_rc_neh_release() argument 122 struct uwb_rc_neh *neh = container_of(kref, struct uwb_rc_neh, kref); in uwb_rc_neh_release() 129 kref_get(&neh->kref); in uwb_rc_neh_get() 138 kref_put(&neh->kref, uwb_rc_neh_release); in uwb_rc_neh_put() 224 kref_init(&neh->kref); in uwb_rc_neh_add()
|
D | rsv.c | 123 static void uwb_rsv_release(struct kref *kref) in uwb_rsv_release() argument 125 struct uwb_rsv *rsv = container_of(kref, struct uwb_rsv, kref); in uwb_rsv_release() 132 kref_get(&rsv->kref); in uwb_rsv_get() 137 kref_put(&rsv->kref, uwb_rsv_release); in uwb_rsv_put() 472 kref_init(&rsv->kref); in uwb_rsv_alloc()
|
D | uwb-internal.h | 279 struct kref refcnt; 293 extern void uwb_bce_kfree(struct kref *_bce);
|
/linux-4.4.14/drivers/usb/ |
D | usb-skeleton.c | 64 struct kref kref; member 68 #define to_skel_dev(d) container_of(d, struct usb_skel, kref) 73 static void skel_delete(struct kref *kref) in skel_delete() argument 75 struct usb_skel *dev = to_skel_dev(kref); in skel_delete() 111 kref_get(&dev->kref); in skel_open() 135 kref_put(&dev->kref, skel_delete); in skel_release() 506 kref_init(&dev->kref); in skel_probe() 576 kref_put(&dev->kref, skel_delete); in skel_probe() 599 kref_put(&dev->kref, skel_delete); in skel_disconnect()
|
/linux-4.4.14/drivers/staging/android/ |
D | sync.h | 93 struct kref kref; member 156 struct kref kref; member
|
D | sync.c | 49 kref_init(&obj->kref); in sync_timeline_create() 64 static void sync_timeline_free(struct kref *kref) in sync_timeline_free() argument 67 container_of(kref, struct sync_timeline, kref); in sync_timeline_free() 79 kref_get(&obj->kref); in sync_timeline_get() 84 kref_put(&obj->kref, sync_timeline_free); in sync_timeline_put() 166 kref_init(&fence->kref); in sync_fence_alloc() 519 static void sync_fence_free(struct kref *kref) in sync_fence_free() argument 521 struct sync_fence *fence = container_of(kref, struct sync_fence, kref); in sync_fence_free() 540 kref_put(&fence->kref, sync_fence_free); in sync_fence_release()
|
/linux-4.4.14/drivers/target/tcm_fc/ |
D | tfc_sess.c | 177 kref_get(&sess->kref); in ft_sess_get() 218 kref_init(&sess->kref); /* ref for table entry */ in ft_sess_create() 428 static void ft_sess_free(struct kref *kref) in ft_sess_free() argument 430 struct ft_sess *sess = container_of(kref, struct ft_sess, kref); in ft_sess_free() 438 int sess_held = atomic_read(&sess->kref.refcount); in ft_sess_put() 441 kref_put(&sess->kref, ft_sess_free); in ft_sess_put()
|
D | tcm_fc.h | 46 struct kref kref; /* ref for hash and outstanding I/Os */ member
|
/linux-4.4.14/drivers/media/usb/as102/ |
D | as102_usb_drv.c | 312 static void as102_usb_release(struct kref *kref) in as102_usb_release() argument 316 as102_dev = container_of(kref, struct as102_dev_t, kref); in as102_usb_release() 342 kref_put(&as102_dev->kref, as102_usb_release); in as102_usb_disconnect() 384 kref_init(&as102_dev->kref); in as102_usb_probe() 456 kref_get(&dev->kref); in as102_open() 469 kref_put(&dev->kref, as102_usb_release); in as102_release()
|
D | as102_drv.h | 62 struct kref kref; member
|
/linux-4.4.14/drivers/s390/cio/ |
D | cmf.c | 215 struct kref kref; member 218 static void cmf_set_schib_release(struct kref *kref) in cmf_set_schib_release() argument 222 set_data = container_of(kref, struct set_schib_struct, kref); in cmf_set_schib_release() 245 kref_init(&set_data->kref); in set_schib_wait() 279 kref_put(&set_data->kref, cmf_set_schib_release); in set_schib_wait() 294 kref_get(&set_data->kref); in retry_set_schib() 298 kref_put(&set_data->kref, cmf_set_schib_release); in retry_set_schib() 342 struct kref kref; member 345 static void cmf_copy_block_release(struct kref *kref) in cmf_copy_block_release() argument 349 copy_block = container_of(kref, struct copy_block_struct, kref); in cmf_copy_block_release() [all …]
|
/linux-4.4.14/drivers/nvme/host/ |
D | nvme.h | 53 struct kref kref; member 85 struct kref kref; member
|
D | pci.c | 1969 static void nvme_free_dev(struct kref *kref); 1970 static void nvme_free_ns(struct kref *kref) in nvme_free_ns() argument 1972 struct nvme_ns *ns = container_of(kref, struct nvme_ns, kref); in nvme_free_ns() 1981 kref_put(&ns->dev->kref, nvme_free_dev); in nvme_free_ns() 1995 else if (!kref_get_unless_zero(&ns->kref)) in nvme_open() 2005 kref_put(&ns->kref, nvme_free_ns); in nvme_release() 2268 kref_init(&ns->kref); in nvme_alloc_ns() 2305 kref_get(&dev->kref); in nvme_alloc_ns() 2561 kref_put(&ns->kref, nvme_free_ns); in nvme_ns_remove() 3054 static void nvme_free_dev(struct kref *kref) in nvme_free_dev() argument [all …]
|
/linux-4.4.14/lib/ |
D | digsig.c | 210 key_ref_t kref; in digsig_verify() local 211 kref = keyring_search(make_key_ref(keyring, 1UL), in digsig_verify() 213 if (IS_ERR(kref)) in digsig_verify() 214 key = ERR_CAST(kref); in digsig_verify() 216 key = key_ref_to_ptr(kref); in digsig_verify()
|
D | kobject.c | 191 kref_init(&kobj->kref); in kobject_init_internal() 598 kref_get(&kobj->kref); in kobject_get() 606 if (!kref_get_unless_zero(&kobj->kref)) in kobject_get_unless_zero() 663 static void kobject_release(struct kref *kref) in kobject_release() argument 665 struct kobject *kobj = container_of(kref, struct kobject, kref); in kobject_release() 691 kref_put(&kobj->kref, kobject_release); in kobject_put()
|
D | cpu_rmap.c | 69 static void cpu_rmap_release(struct kref *ref) in cpu_rmap_release() 268 static void irq_cpu_rmap_release(struct kref *ref) in irq_cpu_rmap_release() 271 container_of(ref, struct irq_glue, notify.kref); in irq_cpu_rmap_release()
|
D | klist.c | 184 static void klist_release(struct kref *kref) in klist_release() argument 187 struct klist_node *n = container_of(kref, struct klist_node, n_ref); in klist_release()
|
/linux-4.4.14/drivers/block/drbd/ |
D | drbd_debugfs.c | 324 kref_get(&req->kref); in seq_print_resource_transfer_log_summary() 329 if (kref_put(&req->kref, drbd_req_destroy)) in seq_print_resource_transfer_log_summary() 374 if (!connection || !kref_get_unless_zero(&connection->kref)) in in_flight_summary_show() 418 kref_put(&connection->kref, drbd_destroy_connection); in in_flight_summary_show() 424 void *data, struct kref *kref, in drbd_single_open() argument 425 void (*release)(struct kref *)) in drbd_single_open() argument 440 && kref_get_unless_zero(kref)) in drbd_single_open() 446 kref_put(kref, release); in drbd_single_open() 456 &resource->kref, drbd_destroy_resource); in in_flight_summary_open() 462 kref_put(&resource->kref, drbd_destroy_resource); in in_flight_summary_release() [all …]
|
D | drbd_main.c | 367 kref_put(&thi->connection->kref, drbd_destroy_connection); in drbd_thread_setup() 368 kref_put(&resource->kref, drbd_destroy_resource); in drbd_thread_setup() 407 kref_get(&resource->kref); in drbd_thread_start() 409 kref_get(&thi->connection->kref); in drbd_thread_start() 424 kref_put(&thi->connection->kref, drbd_destroy_connection); in drbd_thread_start() 425 kref_put(&resource->kref, drbd_destroy_resource); in drbd_thread_start() 2164 void drbd_destroy_device(struct kref *kref) in drbd_destroy_device() argument 2166 struct drbd_device *device = container_of(kref, struct drbd_device, kref); in drbd_destroy_device() 2204 kref_put(&peer_device->connection->kref, drbd_destroy_connection); in drbd_destroy_device() 2209 kref_put(&resource->kref, drbd_destroy_resource); in drbd_destroy_device() [all …]
|
D | drbd_int.h | 380 struct kref kref; member 681 struct kref kref; member 716 struct kref kref; member 837 struct kref kref; member 988 struct kref kref; member 1431 extern void drbd_destroy_device(struct kref *kref); 1439 extern void drbd_destroy_connection(struct kref *kref); 1443 extern void drbd_destroy_resource(struct kref *kref);
|
D | drbd_req.h | 281 extern void drbd_req_destroy(struct kref *kref);
|
D | drbd_req.c | 80 kref_init(&req->kref); in drbd_req_new() 97 void drbd_req_destroy(struct kref *kref) in drbd_req_destroy() argument 99 struct drbd_request *req = container_of(kref, struct drbd_request, kref); in drbd_req_destroy() 453 kref_get(&req->kref); /* wait for the DONE */ in mod_rq_state() 477 kref_get(&req->kref); in mod_rq_state() 522 int refcount = atomic_read(&req->kref.refcount); in mod_rq_state() 536 kref_sub(&req->kref, k_put, drbd_req_destroy); in mod_rq_state() 1312 kref_put(&req->kref, drbd_req_destroy); in drbd_send_and_submit()
|
D | drbd_bitmap.c | 931 static void drbd_bm_aio_ctx_destroy(struct kref *kref) in drbd_bm_aio_ctx_destroy() argument 933 struct drbd_bm_aio_ctx *ctx = container_of(kref, struct drbd_bm_aio_ctx, kref); in drbd_bm_aio_ctx_destroy() 980 kref_put(&ctx->kref, &drbd_bm_aio_ctx_destroy); in drbd_bm_endio() 1066 .kref = { ATOMIC_INIT(2) }, in bm_rw() 1129 kref_put(&ctx->kref, &drbd_bm_aio_ctx_destroy); in bm_rw() 1158 kref_put(&ctx->kref, &drbd_bm_aio_ctx_destroy); in bm_rw()
|
/linux-4.4.14/include/drm/ttm/ |
D | ttm_bo_api.h | 211 struct kref kref; member 212 struct kref list_kref; 299 kref_get(&bo->kref); in ttm_bo_reference()
|
/linux-4.4.14/drivers/hwmon/ |
D | sch56xx-common.c | 70 struct kref kref; member 263 static void watchdog_release_resources(struct kref *r) in watchdog_release_resources() 266 container_of(r, struct sch56xx_watchdog_data, kref); in watchdog_release_resources() 402 kref_get(&data->kref); in watchdog_ref() 409 kref_put(&data->kref, watchdog_release_resources); in watchdog_unref() 451 kref_init(&data->kref); in sch56xx_watchdog_register() 497 kref_put(&data->kref, watchdog_release_resources); in sch56xx_watchdog_unregister()
|
D | fschmd.c | 275 struct kref kref; member 324 static void fschmd_release_resources(struct kref *ref) in fschmd_release_resources() 326 struct fschmd_data *data = container_of(ref, struct fschmd_data, kref); in fschmd_release_resources() 833 kref_get(&data->kref); in watchdog_open() 862 kref_put(&data->kref, fschmd_release_resources); in watchdog_release() 1117 kref_init(&data->kref); in fschmd_probe() 1309 kref_put(&data->kref, fschmd_release_resources); in fschmd_remove()
|
/linux-4.4.14/include/drm/ |
D | drm_gem.h | 43 struct kref refcount; 125 void drm_gem_object_free(struct kref *kref);
|
D | drm_dp_mst_helper.h | 69 struct kref kref; member 114 struct kref kref; member
|
/linux-4.4.14/arch/arm/include/asm/ |
D | dma-iommu.h | 24 struct kref kref; member
|
/linux-4.4.14/drivers/macintosh/ |
D | windfarm_core.c | 150 static void wf_control_release(struct kref *kref) in wf_control_release() argument 152 struct wf_control *ct = container_of(kref, struct wf_control, ref); in wf_control_release() 280 static void wf_sensor_release(struct kref *kref) in wf_sensor_release() argument 282 struct wf_sensor *sr = container_of(kref, struct wf_sensor, ref); in wf_sensor_release()
|
D | windfarm.h | 42 struct kref ref; 110 struct kref ref;
|
D | windfarm_ad7417_sensor.c | 28 struct kref ref; 153 static void wf_ad7417_release(struct kref *ref) in wf_ad7417_release()
|
/linux-4.4.14/arch/mips/include/asm/ |
D | clock.h | 29 struct kref kref; member
|
/linux-4.4.14/drivers/scsi/libsas/ |
D | sas_internal.h | 100 void sas_free_device(struct kref *kref); 189 kref_init(&dev->kref); in sas_alloc_device() 197 kref_put(&dev->kref, sas_free_device); in sas_put_device()
|
D | sas_discover.c | 195 kref_get(&dev->kref); in sas_notify_lldd_dev_found() 304 void sas_free_device(struct kref *kref) in sas_free_device() argument 306 struct domain_device *dev = container_of(kref, typeof(*dev), kref); in sas_free_device()
|
/linux-4.4.14/drivers/scsi/ |
D | sr.c | 136 static void sr_kref_release(struct kref *kref); 168 kref_get(&cd->kref); in scsi_cd_get() 170 kref_put(&cd->kref, sr_kref_release); in scsi_cd_get() 183 kref_put(&cd->kref, sr_kref_release); in scsi_cd_put() 668 kref_init(&cd->kref); in sr_probe() 966 static void sr_kref_release(struct kref *kref) in sr_kref_release() argument 968 struct scsi_cd *cd = container_of(kref, struct scsi_cd, kref); in sr_kref_release() 994 kref_put(&cd->kref, sr_kref_release); in sr_remove()
|
D | sr.h | 55 struct kref kref; member
|
D | st.h | 194 struct kref kref; member
|
/linux-4.4.14/drivers/gpu/drm/ |
D | drm_dp_mst_topology.c | 797 kref_init(&mstb->kref); in drm_dp_add_mst_branch_device() 801 static void drm_dp_free_mst_port(struct kref *kref); 803 static void drm_dp_free_mst_branch_device(struct kref *kref) in drm_dp_free_mst_branch_device() argument 805 struct drm_dp_mst_branch *mstb = container_of(kref, struct drm_dp_mst_branch, kref); in drm_dp_free_mst_branch_device() 808 kref_put(&mstb->port_parent->kref, drm_dp_free_mst_port); in drm_dp_free_mst_branch_device() 813 static void drm_dp_destroy_mst_branch_device(struct kref *kref) in drm_dp_destroy_mst_branch_device() argument 815 struct drm_dp_mst_branch *mstb = container_of(kref, struct drm_dp_mst_branch, kref); in drm_dp_destroy_mst_branch_device() 823 kref_init(kref); in drm_dp_destroy_mst_branch_device() 826 kref_get(&mstb->port_parent->kref); in drm_dp_destroy_mst_branch_device() 855 kref_put(kref, drm_dp_free_mst_branch_device); in drm_dp_destroy_mst_branch_device() [all …]
|
D | drm_drv.c | 114 static void drm_master_destroy(struct kref *kref) in drm_master_destroy() argument 116 struct drm_master *master = container_of(kref, struct drm_master, refcount); in drm_master_destroy() 653 static void drm_dev_release(struct kref *ref) in drm_dev_release()
|
/linux-4.4.14/drivers/firewire/ |
D | nosy.c | 93 struct kref kref; member 99 kref_get(&lynx->kref); in lynx_get() 105 lynx_release(struct kref *kref) in lynx_release() argument 107 kfree(container_of(kref, struct pcilynx, kref)); in lynx_release() 113 kref_put(&lynx->kref, lynx_release); in lynx_put() 561 kref_init(&lynx->kref); in add_card()
|
D | sbp2.c | 270 struct kref kref; member 411 static void free_orb(struct kref *kref) in free_orb() argument 413 struct sbp2_orb *orb = container_of(kref, struct sbp2_orb, kref); in free_orb() 461 kref_put(&orb->kref, free_orb); /* orb callback reference */ in sbp2_status_write() 493 kref_put(&orb->kref, free_orb); /* orb callback reference */ in complete_transaction() 498 kref_put(&orb->kref, free_orb); /* transaction callback reference */ in complete_transaction() 516 kref_get(&orb->kref); /* transaction callback reference */ in sbp2_send_orb() 517 kref_get(&orb->kref); /* orb callback reference */ in sbp2_send_orb() 543 kref_put(&orb->kref, free_orb); /* orb callback reference */ in sbp2_cancel_orbs() 576 kref_init(&orb->base.kref); in sbp2_send_management_orb() [all …]
|
D | core-card.c | 546 kref_init(&card->kref); in fw_card_initialize() 673 void fw_card_release(struct kref *kref) in fw_card_release() argument 675 struct fw_card *card = container_of(kref, struct fw_card, kref); in fw_card_release()
|
/linux-4.4.14/net/bluetooth/ |
D | amp.c | 27 atomic_read(&ctrl->kref.refcount)); in amp_ctrl_get() 29 kref_get(&ctrl->kref); in amp_ctrl_get() 32 static void amp_ctrl_destroy(struct kref *kref) in amp_ctrl_destroy() argument 34 struct amp_ctrl *ctrl = container_of(kref, struct amp_ctrl, kref); in amp_ctrl_destroy() 45 atomic_read(&ctrl->kref.refcount)); in amp_ctrl_put() 47 return kref_put(&ctrl->kref, &_ctrl_destroy); in amp_ctrl_put() 58 kref_init(&ctrl->kref); in amp_ctrl_add()
|
D | amp.h | 19 struct kref kref; member
|
D | a2mp.h | 32 struct kref kref; member
|
D | a2mp.c | 813 BT_DBG("mgr %p orig refcnt %d", mgr, atomic_read(&mgr->kref.refcount)); in amp_mgr_get() 815 kref_get(&mgr->kref); in amp_mgr_get() 820 static void amp_mgr_destroy(struct kref *kref) in amp_mgr_destroy() argument 822 struct amp_mgr *mgr = container_of(kref, struct amp_mgr, kref); in amp_mgr_destroy() 836 BT_DBG("mgr %p orig refcnt %d", mgr, atomic_read(&mgr->kref.refcount)); in amp_mgr_put() 838 return kref_put(&mgr->kref, &_mgr_destroy); in amp_mgr_put() 865 kref_init(&mgr->kref); in amp_mgr_create()
|
/linux-4.4.14/drivers/tty/ |
D | tty_port.c | 31 kref_init(&port->kref); in tty_port_init() 138 static void tty_port_destructor(struct kref *kref) in tty_port_destructor() argument 140 struct tty_port *port = container_of(kref, struct tty_port, kref); in tty_port_destructor() 157 kref_put(&port->kref, tty_port_destructor); in tty_port_put()
|
/linux-4.4.14/drivers/mmc/host/ |
D | vub300.c | 302 struct kref kref; member 358 #define kref_to_vub300_mmc_host(d) container_of(d, struct vub300_mmc_host, kref) 372 static void vub300_delete(struct kref *kref) in vub300_delete() argument 374 struct vub300_mmc_host *vub300 = kref_to_vub300_mmc_host(kref); in vub300_delete() 390 kref_get(&vub300->kref); in vub300_queue_cmnd_work() 404 kref_put(&vub300->kref, vub300_delete); in vub300_queue_cmnd_work() 410 kref_get(&vub300->kref); in vub300_queue_poll_work() 424 kref_put(&vub300->kref, vub300_delete); in vub300_queue_poll_work() 430 kref_get(&vub300->kref); in vub300_queue_dead_work() 444 kref_put(&vub300->kref, vub300_delete); in vub300_queue_dead_work() [all …]
|
/linux-4.4.14/drivers/block/ |
D | rbd.c | 192 struct kref kref; member 200 struct kref kref; member 281 struct kref kref; member 315 struct kref kref; member 664 kref_init(&rbdc->kref); in rbd_client_create() 697 kref_get(&rbdc->kref); in __rbd_get_client() 842 static void rbd_client_release(struct kref *kref) in rbd_client_release() argument 844 struct rbd_client *rbdc = container_of(kref, struct rbd_client, kref); in rbd_client_release() 862 kref_put(&rbdc->kref, rbd_client_release); in rbd_put_client() 1473 atomic_read(&obj_request->kref.refcount)); in rbd_obj_request_get() [all …]
|
/linux-4.4.14/drivers/scsi/device_handler/ |
D | scsi_dh_rdac.c | 154 struct kref kref; member 355 static void release_controller(struct kref *kref) in release_controller() argument 358 ctlr = container_of(kref, struct rdac_controller, kref); in release_controller() 373 kref_get(&tmp->kref); in get_controller() 387 kref_init(&ctlr->kref); in get_controller() 816 kref_put(&h->ctlr->kref, release_controller); in rdac_bus_attach() 833 kref_put(&h->ctlr->kref, release_controller); in rdac_bus_detach()
|
/linux-4.4.14/drivers/scsi/libfc/ |
D | fc_rport.c | 138 kref_init(&rdata->kref); in fc_rport_create() 160 static void fc_rport_destroy(struct kref *kref) in fc_rport_destroy() argument 164 rdata = container_of(kref, struct fc_rport_priv, kref); in fc_rport_destroy() 266 kref_get(&rdata->kref); in fc_rport_work() 274 kref_put(&rdata->kref, lport->tt.rport_destroy); in fc_rport_work() 300 kref_put(&rdata->kref, lport->tt.rport_destroy); in fc_rport_work() 349 kref_put(&rdata->kref, lport->tt.rport_destroy); in fc_rport_work() 362 kref_put(&rdata->kref, lport->tt.rport_destroy); in fc_rport_work() 705 kref_put(&rdata->kref, rdata->local_port->tt.rport_destroy); in fc_rport_flogi_resp() 742 kref_get(&rdata->kref); in fc_rport_enter_flogi() [all …]
|
/linux-4.4.14/drivers/gpu/drm/i915/ |
D | i915_gem_userptr.c | 40 struct kref kref; member 412 kref_init(&mm->kref); in i915_gem_userptr_init__mm_struct() 424 kref_get(&mm->kref); in i915_gem_userptr_init__mm_struct() 442 __i915_mm_struct_free(struct kref *kref) in __i915_mm_struct_free() argument 444 struct i915_mm_struct *mm = container_of(kref, typeof(*mm), kref); in __i915_mm_struct_free() 460 kref_put_mutex(&obj->userptr.mm->kref, in i915_gem_userptr_release__mm_struct()
|
D | i915_gem_gtt.h | 368 struct kref ref; 529 void i915_ppgtt_release(struct kref *kref);
|
/linux-4.4.14/include/video/ |
D | udlfb.h | 40 struct kref kref; member
|
/linux-4.4.14/drivers/usb/misc/sisusbvga/ |
D | sisusb.h | 115 struct kref kref; member 163 #define to_sisusb_dev(d) container_of(d, struct sisusb_usb_data, kref)
|
D | sisusb_init.h | 827 void sisusb_delete(struct kref *kref);
|
/linux-4.4.14/drivers/nvdimm/ |
D | nd.h | 48 struct kref kref; member 252 void nvdimm_drvdata_release(struct kref *kref);
|
D | dimm_devs.c | 231 void nvdimm_drvdata_release(struct kref *kref) in nvdimm_drvdata_release() argument 233 struct nvdimm_drvdata *ndd = container_of(kref, typeof(*ndd), kref); in nvdimm_drvdata_release() 251 kref_get(&ndd->kref); in get_ndd() 257 kref_put(&ndd->kref, nvdimm_drvdata_release); in put_ndd()
|
D | dimm.c | 41 kref_init(&ndd->kref); in nvdimm_probe()
|
/linux-4.4.14/fs/btrfs/ |
D | reada.c | 89 struct kref refcnt; 98 static void reada_control_release(struct kref *kref); 99 static void reada_zone_release(struct kref *kref); 540 static void reada_zone_release(struct kref *kref) in reada_zone_release() argument 542 struct reada_zone *zone = container_of(kref, struct reada_zone, refcnt); in reada_zone_release() 550 static void reada_control_release(struct kref *kref) in reada_control_release() argument 552 struct reada_control *rc = container_of(kref, struct reada_control, in reada_control_release()
|
/linux-4.4.14/drivers/usb/class/ |
D | usbtmc.c | 100 struct kref kref; member 103 #define to_usbtmc_data(d) container_of(d, struct usbtmc_device_data, kref) 119 static void usbtmc_delete(struct kref *kref) in usbtmc_delete() argument 121 struct usbtmc_device_data *data = to_usbtmc_data(kref); in usbtmc_delete() 139 kref_get(&data->kref); in usbtmc_open() 151 kref_put(&data->kref, usbtmc_delete); in usbtmc_release() 1115 kref_init(&data->kref); in usbtmc_probe() 1188 kref_put(&data->kref, usbtmc_delete); in usbtmc_probe() 1205 kref_put(&data->kref, usbtmc_delete); in usbtmc_disconnect()
|
/linux-4.4.14/drivers/usb/host/ |
D | u132-hcd.c | 127 struct kref kref; member 147 struct kref kref; member 183 struct kref kref; member 246 #define kref_to_u132(d) container_of(d, struct u132, kref) 247 #define kref_to_u132_endp(d) container_of(d, struct u132_endp, kref) 248 #define kref_to_u132_udev(d) container_of(d, struct u132_udev, kref) 254 static void u132_hcd_delete(struct kref *kref) in u132_hcd_delete() argument 256 struct u132 *u132 = kref_to_u132(kref); in u132_hcd_delete() 271 kref_put(&u132->kref, u132_hcd_delete); in u132_u132_put_kref() 276 kref_init(&u132->kref); in u132_u132_init_kref() [all …]
|
D | oxu210hp.h | 304 struct kref kref; member
|
/linux-4.4.14/arch/powerpc/oprofile/cell/ |
D | spu_task_sync.c | 141 struct kref cache_ref; 146 static void destroy_cached_info(struct kref *kref) in destroy_cached_info() argument 150 info = container_of(kref, struct cached_info, cache_ref); in destroy_cached_info() 162 struct kref *ref; in get_cached_info()
|
/linux-4.4.14/drivers/remoteproc/ |
D | remoteproc_internal.h | 49 void rproc_release(struct kref *kref);
|
/linux-4.4.14/mm/ |
D | zswap.c | 118 struct kref kref; member 603 kref_init(&pool->kref); in zswap_pool_create() 658 return kref_get_unless_zero(&pool->kref); in zswap_pool_get() 666 WARN_ON(kref_get_unless_zero(&pool->kref)); in __zswap_pool_release() 672 static void __zswap_pool_empty(struct kref *kref) in __zswap_pool_empty() argument 676 pool = container_of(kref, typeof(*pool), kref); in __zswap_pool_empty() 690 kref_put(&pool->kref, __zswap_pool_empty); in zswap_pool_put()
|
/linux-4.4.14/fs/ocfs2/cluster/ |
D | tcp_internal.h | 131 struct kref sc_kref; 202 struct kref nh_kref;
|
/linux-4.4.14/drivers/infiniband/hw/qib/ |
D | qib_sdma.c | 83 static void sdma_complete(struct kref *); 94 kref_get(&ss->kref); in sdma_get() 97 static void sdma_complete(struct kref *kref) in sdma_complete() argument 100 container_of(kref, struct qib_sdma_state, kref); in sdma_complete() 107 kref_put(&ss->kref, sdma_complete); in sdma_put() 450 kref_init(&ppd->sdma_state.kref); in qib_setup_sdma()
|
/linux-4.4.14/fs/nfs/ |
D | direct.c | 74 struct kref kref; /* release manager */ member 311 kref_init(&dreq->kref); in nfs_direct_req_alloc() 312 kref_get(&dreq->kref); in nfs_direct_req_alloc() 323 static void nfs_direct_req_free(struct kref *kref) in nfs_direct_req_free() argument 325 struct nfs_direct_req *dreq = container_of(kref, struct nfs_direct_req, kref); in nfs_direct_req_free() 337 kref_put(&dreq->kref, nfs_direct_req_free); in nfs_direct_req_release()
|
/linux-4.4.14/drivers/infiniband/hw/cxgb4/ |
D | iw_cxgb4.h | 651 ep, atomic_read(&((ep)->kref.refcount))); \ 652 WARN_ON(atomic_read(&((ep)->kref.refcount)) < 1); \ 653 kref_put(&((ep)->kref), _c4iw_free_ep); \ 658 ep, atomic_read(&((ep)->kref.refcount))); \ 659 kref_get(&((ep)->kref)); \ 661 void _c4iw_free_ep(struct kref *kref); 789 struct kref kref; member
|
/linux-4.4.14/net/sunrpc/auth_gss/ |
D | auth_gss.c | 86 struct kref kref; member 90 struct kref kref; member 519 kref_get(&gss_auth->kref); in gss_alloc_msg() 886 kref_init(&p->kref); in gss_pipe_alloc() 913 if (!kref_get_unless_zero(&gss_pipe->kref)) in gss_pipe_match_pdo() 963 static void __gss_pipe_release(struct kref *kref) in __gss_pipe_release() argument 965 struct gss_pipe *p = container_of(kref, struct gss_pipe, kref); in __gss_pipe_release() 973 kref_put(&p->kref, __gss_pipe_release); in gss_pipe_free() 1021 kref_init(&gss_auth->kref); in gss_create_new() 1078 gss_free_callback(struct kref *kref) in gss_free_callback() argument [all …]
|
/linux-4.4.14/fs/ceph/ |
D | mds_client.h | 249 struct kref r_kref; 395 extern void ceph_mdsc_release_request(struct kref *kref);
|
/linux-4.4.14/include/scsi/ |
D | osd_ore.h | 117 struct kref kref; member
|
D | libfc.h | 199 struct kref kref; member 704 void (*rport_destroy)(struct kref *);
|
/linux-4.4.14/drivers/scsi/lpfc/ |
D | lpfc_disc.h | 115 struct kref kref; member
|
/linux-4.4.14/drivers/video/fbdev/ |
D | smscufx.c | 100 struct kref kref; member 1082 kref_get(&dev->kref); in ufx_ops_open() 1111 static void ufx_free(struct kref *kref) in ufx_free() argument 1113 struct ufx_data *dev = container_of(kref, struct ufx_data, kref); in ufx_free() 1157 kref_put(&dev->kref, ufx_free); in ufx_free_framebuffer_work() 1183 kref_put(&dev->kref, ufx_free); in ufx_ops_release() 1639 kref_init(&dev->kref); /* matching kref_put in usb .disconnect fn */ in ufx_usb_probe() 1640 kref_get(&dev->kref); /* matching kref_put in free_framebuffer_work */ in ufx_usb_probe() 1752 kref_put(&dev->kref, ufx_free); /* ref for framebuffer */ in ufx_usb_probe() 1753 kref_put(&dev->kref, ufx_free); /* last ref from kref_init */ in ufx_usb_probe() [all …]
|
D | udlfb.c | 892 kref_get(&dev->kref); in dlfb_ops_open() 921 static void dlfb_free(struct kref *kref) in dlfb_free() argument 923 struct dlfb_data *dev = container_of(kref, struct dlfb_data, kref); in dlfb_free() 968 kref_put(&dev->kref, dlfb_free); in dlfb_free_framebuffer() 1000 kref_put(&dev->kref, dlfb_free); in dlfb_ops_release() 1597 kref_init(&dev->kref); /* matching kref_put in usb .disconnect fn */ in dlfb_usb_probe() 1633 kref_get(&dev->kref); /* matching kref_put in free_framebuffer_work */ in dlfb_usb_probe() 1647 kref_put(&dev->kref, dlfb_free); /* ref for framebuffer */ in dlfb_usb_probe() 1648 kref_put(&dev->kref, dlfb_free); /* last ref from kref_init */ in dlfb_usb_probe() 1767 kref_put(&dev->kref, dlfb_free); in dlfb_usb_disconnect()
|
/linux-4.4.14/include/linux/usb/ |
D | serial.h | 167 struct kref kref; member 171 #define to_usb_serial(d) container_of(d, struct usb_serial, kref)
|
/linux-4.4.14/Documentation/watchdog/ |
D | watchdog-kernel-api.txt | 118 1) Add a kref struct to the same structure which is holding the watchdog_device 119 2) Define a release callback for the kref which frees the struct holding both 120 3) Call kref_init on this kref *before* calling watchdog_register_device() 121 4) Define a ref operation calling kref_get on this kref 122 5) Define a unref operation calling kref_put on this kref 125 * *After* calling watchdog_unregister_device() call kref_put on the kref 167 * ref: the operation that calls kref_get on the kref of a dynamically 169 * unref: the operation that calls kref_put on the kref of a dynamically
|
/linux-4.4.14/drivers/scsi/cxgbi/ |
D | libcxgbi.h | 128 struct kref refcnt; 212 struct kref refcnt; 362 static inline void cxgbi_sock_free(struct kref *kref) in cxgbi_sock_free() argument 364 struct cxgbi_sock *csk = container_of(kref, in cxgbi_sock_free()
|
/linux-4.4.14/drivers/net/wimax/i2400m/ |
D | fw.c | 1504 struct kref kref; member 1510 void i2400m_fw_destroy(struct kref *kref) in i2400m_fw_destroy() argument 1513 container_of(kref, struct i2400m_fw, kref); in i2400m_fw_destroy() 1523 kref_get(&i2400m_fw->kref); in i2400m_fw_get() 1531 kref_put(&i2400m_fw->kref, i2400m_fw_destroy); in i2400m_fw_put() 1629 kref_init(&i2400m_fw->kref); in i2400m_fw_cache()
|
/linux-4.4.14/drivers/infiniband/ulp/isert/ |
D | ib_isert.h | 171 struct kref kref; member
|
/linux-4.4.14/drivers/tty/serial/ |
D | icom.h | 273 struct kref kref; member
|
D | icom.c | 67 #define to_icom_adapter(d) container_of(d, struct icom_adapter, kref) 148 static void icom_kref_release(struct kref *kref); 1075 kref_get(&ICOM_PORT->adapter->kref); in icom_open() 1079 kref_put(&ICOM_PORT->adapter->kref, icom_kref_release); in icom_open() 1099 kref_put(&ICOM_PORT->adapter->kref, icom_kref_release); in icom_close() 1484 static void icom_kref_release(struct kref *kref) in icom_kref_release() argument 1488 icom_adapter = to_icom_adapter(kref); in icom_kref_release() 1589 kref_init(&icom_adapter->kref); in icom_probe() 1613 kref_put(&icom_adapter->kref, icom_kref_release); in icom_remove()
|
/linux-4.4.14/drivers/staging/fwserial/ |
D | fwserial.h | 325 struct kref kref; member
|
/linux-4.4.14/drivers/dma-buf/ |
D | fence.c | 172 void fence_release(struct kref *kref) in fence_release() argument 175 container_of(kref, struct fence, refcount); in fence_release()
|
/linux-4.4.14/security/apparmor/ |
D | match.c | 185 void aa_dfa_free_kref(struct kref *kref) in aa_dfa_free_kref() argument 187 struct aa_dfa *dfa = container_of(kref, struct aa_dfa, count); in aa_dfa_free_kref()
|
D | policy.c | 573 void aa_free_replacedby_kref(struct kref *kref) in aa_free_replacedby_kref() argument 575 struct aa_replacedby *r = container_of(kref, struct aa_replacedby, in aa_free_replacedby_kref() 634 void aa_free_profile_kref(struct kref *kref) in aa_free_profile_kref() argument 636 struct aa_profile *p = container_of(kref, struct aa_profile, count); in aa_free_profile_kref()
|
/linux-4.4.14/drivers/gpu/host1x/ |
D | intr.c | 38 static void waiter_release(struct kref *kref) in waiter_release() argument 40 kfree(container_of(kref, struct host1x_waitlist, refcount)); in waiter_release()
|
D | intr.h | 58 struct kref refcount;
|
/linux-4.4.14/drivers/scsi/bnx2fc/ |
D | bnx2fc.h | 260 struct kref kref; member 424 struct kref refcount; 491 void bnx2fc_cmd_release(struct kref *ref);
|
/linux-4.4.14/fs/ocfs2/dlm/ |
D | dlmlock.c | 65 static void dlm_lock_release(struct kref *kref); 352 static void dlm_lock_release(struct kref *kref) in dlm_lock_release() argument 356 lock = container_of(kref, struct dlm_lock, lock_refs); in dlm_lock_release()
|
D | dlmdebug.h | 33 struct kref debug_refcnt;
|
/linux-4.4.14/init/ |
D | version.c | 26 .kref = {
|
/linux-4.4.14/drivers/gpu/drm/vmwgfx/ |
D | vmwgfx_resource.c | 88 kref_get(&res->kref); in vmw_resource_reference() 95 return kref_get_unless_zero(&res->kref) ? res : NULL; in vmw_resource_reference_unless_doomed() 117 static void vmw_resource_release(struct kref *kref) in vmw_resource_release() argument 120 container_of(kref, struct vmw_resource, kref); in vmw_resource_release() 171 kref_put(&res->kref, vmw_resource_release); in vmw_resource_unreference() 219 kref_init(&res->kref); in vmw_resource_init() 269 if (!res || !res->avail || !kref_get_unless_zero(&res->kref)) in vmw_resource_lookup() 320 kref_get(&res->kref); in vmw_user_resource_lookup_handle()
|
/linux-4.4.14/drivers/char/ |
D | virtio_console.c | 224 struct kref kref; member 278 kref_get(&port->kref); in find_port_by_devt_in_portdev() 1005 static void remove_port(struct kref *kref); 1036 kref_put(&port->kref, remove_port); in port_fops_release() 1091 kref_put(&port->kref, remove_port); in port_fops_open() 1404 kref_init(&port->kref); in add_port() 1520 static void remove_port(struct kref *kref) in remove_port() argument 1524 port = container_of(kref, struct port, kref); in remove_port() 1603 kref_put(&port->kref, remove_port); in unplug_port()
|
/linux-4.4.14/drivers/scsi/csiostor/ |
D | csio_lnode.h | 88 struct kref kref; member
|
/linux-4.4.14/drivers/scsi/ibmvscsi/ |
D | ibmvfc.c | 919 kref_get(&tgt->kref); in __ibmvfc_get_target() 1048 static void ibmvfc_release_tgt(struct kref *kref) in ibmvfc_release_tgt() argument 1050 struct ibmvfc_target *tgt = container_of(kref, struct ibmvfc_target, kref); in ibmvfc_release_tgt() 1066 kref_put(&tgt->kref, ibmvfc_release_tgt); in ibmvfc_get_starget_node_name() 1081 kref_put(&tgt->kref, ibmvfc_release_tgt); in ibmvfc_get_starget_port_name() 1096 kref_put(&tgt->kref, ibmvfc_release_tgt); in ibmvfc_get_starget_port_id() 3349 kref_put(&tgt->kref, ibmvfc_release_tgt); in ibmvfc_tgt_prli_done() 3368 kref_get(&tgt->kref); in ibmvfc_tgt_send_prli() 3388 kref_put(&tgt->kref, ibmvfc_release_tgt); in ibmvfc_tgt_send_prli() 3445 kref_put(&tgt->kref, ibmvfc_release_tgt); in ibmvfc_tgt_plogi_done() [all …]
|
/linux-4.4.14/fs/exofs/ |
D | ore.c | 345 static void _last_io(struct kref *kref) in _last_io() argument 348 kref, struct ore_io_state, kref); in _last_io() 357 kref_put(&ios->kref, _last_io); in _done_io() 384 kref_init(&ios->kref); in ore_io_execute() 391 kref_get(&ios->kref); in ore_io_execute() 395 kref_put(&ios->kref, _last_io); in ore_io_execute()
|
/linux-4.4.14/include/linux/sunrpc/ |
D | cache.h | 56 struct kref ref; 84 void (*cache_put)(struct kref *);
|
/linux-4.4.14/drivers/usb/serial/ |
D | console.c | 142 kref_init(&tty->kref); in usb_console_setup() 147 kref_get(&tty->driver->kref); in usb_console_setup()
|
/linux-4.4.14/drivers/pci/hotplug/ |
D | acpiphp_glue.c | 65 static void free_bridge(struct kref *kref); 155 static void free_bridge(struct kref *kref) in free_bridge() argument 164 bridge = container_of(kref, struct acpiphp_bridge, ref); in free_bridge()
|
/linux-4.4.14/drivers/xen/xen-pciback/ |
D | pci_stub.c | 46 struct kref kref; member 82 kref_init(&psdev->kref); in pcistub_device_alloc() 89 static void pcistub_device_release(struct kref *kref) in pcistub_device_release() argument 95 psdev = container_of(kref, struct pcistub_device, kref); in pcistub_device_release() 144 kref_get(&psdev->kref); in pcistub_device_get() 149 kref_put(&psdev->kref, pcistub_device_release); in pcistub_device_put()
|
/linux-4.4.14/drivers/usb/mon/ |
D | usb_mon.h | 32 struct kref ref; /* Under mon_lock */
|
/linux-4.4.14/drivers/target/iscsi/ |
D | iscsi_target.h | 10 extern void iscsit_login_kref_put(struct kref *);
|
/linux-4.4.14/drivers/char/hw_random/ |
D | core.c | 97 static inline void cleanup_rng(struct kref *kref) in cleanup_rng() argument 99 struct hwrng *rng = container_of(kref, struct hwrng, ref); in cleanup_rng()
|
/linux-4.4.14/arch/powerpc/platforms/powermac/ |
D | pfunc_core.c | 543 struct kref ref; 550 static void pmf_release_device(struct kref *kref) in pmf_release_device() argument 552 struct pmf_device *dev = container_of(kref, struct pmf_device, ref); in pmf_release_device() 757 static void pmf_release_function(struct kref *kref) in pmf_release_function() argument 760 container_of(kref, struct pmf_function, ref); in pmf_release_function()
|
/linux-4.4.14/net/sunrpc/ |
D | svcauth_unix.c | 96 static void ip_map_put(struct kref *kref) in ip_map_put() argument 98 struct cache_head *item = container_of(kref, struct cache_head, ref); in ip_map_put() 422 static void unix_gid_put(struct kref *kref) in unix_gid_put() argument 424 struct cache_head *item = container_of(kref, struct cache_head, ref); in unix_gid_put()
|
/linux-4.4.14/drivers/dma/ |
D | dmaengine.c | 1038 static void dmaengine_unmap(struct kref *kref) in dmaengine_unmap() argument 1040 struct dmaengine_unmap_data *unmap = container_of(kref, typeof(*unmap), kref); in dmaengine_unmap() 1066 kref_put(&unmap->kref, dmaengine_unmap); in dmaengine_unmap_put() 1121 kref_init(&unmap->kref); in dmaengine_get_unmap_data()
|
/linux-4.4.14/drivers/s390/crypto/ |
D | zcrypt_api.h | 105 struct kref refcount; /* device refcounting */
|
/linux-4.4.14/drivers/infiniband/hw/usnic/ |
D | usnic_ib.h | 80 struct kref vf_cnt;
|
/linux-4.4.14/include/linux/mtd/ |
D | blktrans.h | 44 struct kref ref;
|
/linux-4.4.14/drivers/usb/wusbcore/ |
D | wa-hc.h | 114 struct kref refcnt; 321 extern void rpipe_destroy(struct kref *_rpipe);
|
D | wusbhc.h | 97 struct kref refcnt; 122 extern void wusb_dev_destroy(struct kref *_wusb_dev);
|
/linux-4.4.14/fs/cifs/ |
D | smb2proto.h | 133 void (*release)(struct kref *kref));
|
D | cifsproto.h | 496 void cifs_readdata_release(struct kref *refcount); 501 void (*release)(struct kref *kref)); 505 void cifs_writedata_release(struct kref *refcount);
|
/linux-4.4.14/drivers/xen/ |
D | xen-scsiback.c | 83 struct kref kref; member 312 static void scsiback_free_translation_entry(struct kref *kref) in scsiback_free_translation_entry() argument 314 struct v2p_entry *entry = container_of(kref, struct v2p_entry, kref); in scsiback_free_translation_entry() 362 kref_put(&pending_req->v2p->kref, in scsiback_do_resp_with_sense() 645 kref_get(&entry->kref); in scsiback_do_translation() 932 kref_init(&new->kref); in scsiback_add_translation_entry() 955 kref_put(&entry->kref, scsiback_free_translation_entry); in __scsiback_del_translation_entry()
|
/linux-4.4.14/sound/pci/hda/ |
D | hda_codec.h | 177 struct kref kref; member 423 kref_get(&pcm->kref); in snd_hda_codec_pcm_get()
|
/linux-4.4.14/drivers/staging/comedi/ |
D | comedi_buf.c | 31 static void comedi_buf_map_kref_release(struct kref *kref) in comedi_buf_map_kref_release() argument 34 container_of(kref, struct comedi_buf_map, refcount); in comedi_buf_map_kref_release()
|
/linux-4.4.14/net/mac802154/ |
D | llsec.h | 35 struct kref ref;
|
/linux-4.4.14/drivers/gpu/drm/nouveau/include/nvkm/subdev/ |
D | mmu.h | 32 struct kref refcount;
|
/linux-4.4.14/include/target/ |
D | target_core_base.h | 497 struct kref cmd_kref; 566 struct kref acl_kref; 612 struct kref sess_kref; 647 struct kref pr_kref;
|
/linux-4.4.14/drivers/usb/gadget/legacy/ |
D | tcm_usb_gadget.h | 72 struct kref ref;
|
/linux-4.4.14/include/linux/iio/ |
D | buffer.h | 96 struct kref ref;
|
/linux-4.4.14/drivers/vhost/ |
D | scsi.c | 65 struct kref kref; member 219 static void vhost_scsi_done_inflight(struct kref *kref) in vhost_scsi_done_inflight() argument 223 inflight = container_of(kref, struct vhost_scsi_inflight, kref); in vhost_scsi_done_inflight() 247 kref_init(&new_inflight->kref); in vhost_scsi_init_inflight() 262 kref_get(&inflight->kref); in vhost_scsi_get_inflight() 269 kref_put(&inflight->kref, vhost_scsi_done_inflight); in vhost_scsi_put_inflight() 1175 kref_put(&old_inflight[i]->kref, vhost_scsi_done_inflight); in vhost_scsi_flush()
|
/linux-4.4.14/drivers/media/usb/em28xx/ |
D | em28xx.h | 510 struct kref ref; 602 struct kref ref; 786 void em28xx_free_device(struct kref *ref);
|