/linux-4.1.27/include/linux/ |
D | kref.h | 24 struct kref { struct 32 static inline void kref_init(struct kref *kref) in kref_init() argument 34 atomic_set(&kref->refcount, 1); in kref_init() 41 static inline void kref_get(struct kref *kref) in kref_get() argument 47 WARN_ON_ONCE(atomic_inc_return(&kref->refcount) < 2); in kref_get() 68 static inline int kref_sub(struct kref *kref, unsigned int count, in kref_sub() argument 69 void (*release)(struct kref *kref)) in kref_sub() argument 73 if (atomic_sub_and_test((int) count, &kref->refcount)) { in kref_sub() 74 release(kref); in kref_sub() 97 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 | fence.h | 73 struct kref refcount; 181 void fence_release(struct kref *kref);
|
D | tty_driver.h | 298 struct kref kref; /* Reference management */ member 359 kref_get(&d->kref); in tty_driver_kref_get()
|
D | posix-clock.h | 120 struct kref kref; member
|
D | nvme.h | 90 struct kref kref; member
|
D | kobject.h | 70 struct kref kref; member
|
D | bsg.h | 13 struct kref ref;
|
D | interrupt.h | 216 struct kref kref; member 219 void (*release)(struct kref *ref);
|
D | dmaengine.h | 392 void dma_chan_cleanup(struct kref *kref); 415 struct kref kref; member 458 kref_get(&unmap->kref); in dma_set_unmap()
|
D | tty.h | 243 struct kref kref; /* Ref counter */ member 262 struct kref kref; member 418 kref_get(&tty->kref); in tty_kref_get() 544 if (port && kref_get_unless_zero(&port->kref)) in tty_port_get()
|
D | hw_random.h | 49 struct kref ref;
|
D | cpu_rmap.h | 28 struct kref refcount;
|
D | klist.h | 42 struct kref n_ref;
|
/linux-4.1.27/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 | 164 struct kref kref; member
|
/linux-4.1.27/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.1.27/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.1.27/drivers/acpi/ |
D | acpi_ipmi.c | 57 struct kref kref; member 100 struct kref kref; member 138 kref_init(&ipmi_device->kref); in ipmi_dev_alloc() 165 static void ipmi_dev_release_kref(struct kref *kref) in ipmi_dev_release_kref() argument 168 container_of(kref, struct acpi_ipmi_device, kref); in ipmi_dev_release_kref() 193 kref_get(&ipmi_device->kref); in acpi_ipmi_dev_get() 202 kref_put(&ipmi_device->kref, ipmi_dev_release_kref); in acpi_ipmi_dev_put() 220 kref_init(&ipmi_msg->kref); in ipmi_msg_alloc() 235 static void ipmi_msg_release_kref(struct kref *kref) in ipmi_msg_release_kref() argument 238 container_of(kref, struct acpi_ipmi_msg, kref); in ipmi_msg_release_kref() [all …]
|
D | ec.c | 111 struct kref kref; member 812 kref_get(&handler->kref); in acpi_ec_get_query_handler() 816 static void acpi_ec_query_handler_release(struct kref *kref) in acpi_ec_query_handler_release() argument 819 container_of(kref, struct acpi_ec_query_handler, kref); in acpi_ec_query_handler_release() 826 kref_put(&handler->kref, acpi_ec_query_handler_release); in acpi_ec_put_query_handler() 844 kref_init(&handler->kref); in acpi_ec_add_query_handler()
|
/linux-4.1.27/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 | 455 static void release_generic_request(struct kref *kref) in release_generic_request() argument 458 container_of(kref, struct ceph_mon_generic_request, kref); in release_generic_request() 470 kref_put(&req->kref, release_generic_request); in put_generic_request() 475 kref_get(&req->kref); in get_generic_request() 589 kref_init(&req->kref); in ceph_monc_do_statfs() 670 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.1.27/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() 167 kref_init(&driver_data->kref); in da9055_wdt_probe() 191 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() 200 kref_init(&driver_data->kref); in da9052_wdt_probe() 227 kref_put(&driver_data->kref, da9052_wdt_release_resources); in da9052_wdt_remove()
|
/linux-4.1.27/kernel/sched/ |
D | auto_group.c | 19 kref_init(&autogroup_default.kref); in autogroup_init() 29 static inline void autogroup_destroy(struct kref *kref) in autogroup_destroy() argument 31 struct autogroup *ag = container_of(kref, struct autogroup, kref); in autogroup_destroy() 44 kref_put(&ag->kref, autogroup_destroy); in autogroup_kref_put() 49 kref_get(&ag->kref); in autogroup_kref_get() 80 kref_init(&ag->kref); in autogroup_create()
|
D | auto_group.h | 12 struct kref kref; member
|
/linux-4.1.27/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() 1115 kref_init(&bo->kref); in ttm_bo_init()
|
/linux-4.1.27/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.1.27/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.1.27/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.1.27/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.1.27/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.1.27/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.1.27/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.1.27/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.1.27/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 | 184 kref_get(&buf->chan->kref); in relay_create_buf() 199 static void relay_destroy_channel(struct kref *kref) in relay_destroy_channel() argument 201 struct rchan *chan = container_of(kref, struct rchan, kref); in relay_destroy_channel() 223 kref_put(&chan->kref, relay_destroy_channel); in relay_destroy_buf() 234 static void relay_remove_buf(struct kref *kref) in relay_remove_buf() argument 236 struct rchan_buf *buf = container_of(kref, struct rchan_buf, kref); in relay_remove_buf() 357 kref_init(&buf->kref); in __relay_reset() 487 kref_put(&buf->kref, relay_remove_buf); in relay_close_buf() 599 kref_init(&chan->kref); in relay_open() 618 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.1.27/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.1.27/drivers/infiniband/core/ |
D | iwpm_util.h | 69 struct kref kref; member 110 void iwpm_free_nlmsg_request(struct kref *kref);
|
D | iwpm_util.c | 317 kref_init(&nlmsg_request->kref); in iwpm_get_nlmsg_request() 318 kref_get(&nlmsg_request->kref); in iwpm_get_nlmsg_request() 326 void iwpm_free_nlmsg_request(struct kref *kref) in iwpm_free_nlmsg_request() argument 331 nlmsg_request = container_of(kref, struct iwpm_nlmsg_request, kref); in iwpm_free_nlmsg_request() 354 kref_get(&nlmsg_request->kref); in iwpm_find_nlmsg_request() 376 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() 751 kref_put(&nlmsg_request->kref, iwpm_free_nlmsg_request); in iwpm_mapping_error_cb()
|
D | uverbs.h | 101 struct kref ref; 112 struct kref ref;
|
/linux-4.1.27/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.1.27/drivers/vfio/ |
D | vfio.c | 59 struct kref kref; member 72 struct kref kref; member 89 struct kref kref; member 171 kref_get(&container->kref); in vfio_container_get() 174 static void vfio_container_release(struct kref *kref) in vfio_container_release() argument 177 container = container_of(kref, struct vfio_container, kref); in vfio_container_release() 184 kref_put(&container->kref, vfio_container_release); in vfio_container_put() 211 kref_init(&group->kref); in vfio_create_group() 272 static void vfio_group_release(struct kref *kref) in vfio_group_release() argument 274 struct vfio_group *group = container_of(kref, struct vfio_group, kref); in vfio_group_release() [all …]
|
/linux-4.1.27/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.1.27/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.1.27/fs/configfs/ |
D | item.c | 44 static void config_item_release(struct kref *kref); 160 static void config_item_release(struct kref *kref) in config_item_release() argument 162 config_item_cleanup(container_of(kref, struct config_item, ci_kref)); in config_item_release()
|
/linux-4.1.27/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.1.27/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.1.27/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.1.27/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.1.27/drivers/target/tcm_fc/ |
D | tfc_sess.c | 183 kref_get(&sess->kref); in ft_sess_get() 224 kref_init(&sess->kref); /* ref for table entry */ in ft_sess_create() 434 static void ft_sess_free(struct kref *kref) in ft_sess_free() argument 436 struct ft_sess *sess = container_of(kref, struct ft_sess, kref); in ft_sess_free() 444 int sess_held = atomic_read(&sess->kref.refcount); in ft_sess_put() 447 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.1.27/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.1.27/drivers/s390/cio/ |
D | cmf.c | 210 struct kref kref; member 213 static void cmf_set_schib_release(struct kref *kref) in cmf_set_schib_release() argument 217 set_data = container_of(kref, struct set_schib_struct, kref); in cmf_set_schib_release() 240 kref_init(&set_data->kref); in set_schib_wait() 274 kref_put(&set_data->kref, cmf_set_schib_release); in set_schib_wait() 289 kref_get(&set_data->kref); in retry_set_schib() 293 kref_put(&set_data->kref, cmf_set_schib_release); in retry_set_schib() 337 struct kref kref; member 340 static void cmf_copy_block_release(struct kref *kref) in cmf_copy_block_release() argument 344 copy_block = container_of(kref, struct copy_block_struct, kref); in cmf_copy_block_release() [all …]
|
/linux-4.1.27/lib/ |
D | digsig.c | 209 key_ref_t kref; in digsig_verify() local 210 kref = keyring_search(make_key_ref(keyring, 1UL), in digsig_verify() 212 if (IS_ERR(kref)) in digsig_verify() 213 key = ERR_CAST(kref); in digsig_verify() 215 key = key_ref_to_ptr(kref); in digsig_verify()
|
D | kobject.c | 191 kref_init(&kobj->kref); in kobject_init_internal() 584 kref_get(&kobj->kref); in kobject_get() 591 if (!kref_get_unless_zero(&kobj->kref)) in kobject_get_unless_zero() 648 static void kobject_release(struct kref *kref) in kobject_release() argument 650 struct kobject *kobj = container_of(kref, struct kobject, kref); in kobject_release() 676 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.1.27/net/bluetooth/ |
D | amp.c | 26 atomic_read(&ctrl->kref.refcount)); in amp_ctrl_get() 28 kref_get(&ctrl->kref); in amp_ctrl_get() 31 static void amp_ctrl_destroy(struct kref *kref) in amp_ctrl_destroy() argument 33 struct amp_ctrl *ctrl = container_of(kref, struct amp_ctrl, kref); in amp_ctrl_destroy() 44 atomic_read(&ctrl->kref.refcount)); in amp_ctrl_put() 46 return kref_put(&ctrl->kref, &_ctrl_destroy); in amp_ctrl_put() 57 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 | 798 BT_DBG("mgr %p orig refcnt %d", mgr, atomic_read(&mgr->kref.refcount)); in amp_mgr_get() 800 kref_get(&mgr->kref); in amp_mgr_get() 805 static void amp_mgr_destroy(struct kref *kref) in amp_mgr_destroy() argument 807 struct amp_mgr *mgr = container_of(kref, struct amp_mgr, kref); in amp_mgr_destroy() 821 BT_DBG("mgr %p orig refcnt %d", mgr, atomic_read(&mgr->kref.refcount)); in amp_mgr_put() 823 return kref_put(&mgr->kref, &_mgr_destroy); in amp_mgr_put() 850 kref_init(&mgr->kref); in amp_mgr_create()
|
/linux-4.1.27/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() 432 void *data, struct kref *kref, in drbd_single_open() argument 433 void (*release)(struct kref *)) in drbd_single_open() argument 448 && kref_get_unless_zero(kref)) in drbd_single_open() 454 kref_put(kref, release); in drbd_single_open() 464 &resource->kref, drbd_destroy_resource); in in_flight_summary_open() 470 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 | 379 struct kref kref; member 680 struct kref kref; member 715 struct kref kref; member 836 struct kref kref; member 987 struct kref kref; member 1430 extern void drbd_destroy_device(struct kref *kref); 1438 extern void drbd_destroy_connection(struct kref *kref); 1442 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() 452 kref_get(&req->kref); /* wait for the DONE */ in mod_rq_state() 476 kref_get(&req->kref); in mod_rq_state() 521 int refcount = atomic_read(&req->kref.refcount); in mod_rq_state() 535 kref_sub(&req->kref, k_put, drbd_req_destroy); in mod_rq_state() 1310 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() 989 kref_put(&ctx->kref, &drbd_bm_aio_ctx_destroy); in drbd_bm_endio() 1075 .kref = { ATOMIC_INIT(2) }, in bm_rw() 1138 kref_put(&ctx->kref, &drbd_bm_aio_ctx_destroy); in bm_rw() 1167 kref_put(&ctx->kref, &drbd_bm_aio_ctx_destroy); in bm_rw()
|
/linux-4.1.27/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.1.27/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.1.27/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.1.27/arch/arm/include/asm/ |
D | dma-iommu.h | 24 struct kref kref; member
|
/linux-4.1.27/net/tipc/ |
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.c | 71 static void tipc_node_kref_release(struct kref *kref) in tipc_node_kref_release() argument 73 struct tipc_node *node = container_of(kref, struct tipc_node, kref); in tipc_node_kref_release() 80 kref_put(&node->kref, tipc_node_kref_release); in tipc_node_put() 85 kref_get(&node->kref); in tipc_node_get() 128 kref_init(&n_ptr->kref); in tipc_node_create()
|
D | node.h | 119 struct kref kref; member
|
/linux-4.1.27/arch/mips/include/asm/ |
D | clock.h | 29 struct kref kref; member
|
/linux-4.1.27/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.1.27/drivers/scsi/device_handler/ |
D | scsi_dh.c | 107 kref_get(&sdev->scsi_dh_data->kref); in scsi_dh_handler_attach() 123 kref_init(&d->kref); in scsi_dh_handler_attach() 132 static void __detach_handler (struct kref *kref) in __detach_handler() argument 135 container_of(kref, struct scsi_dh_data, kref); in __detach_handler() 170 kref_put(&sdev->scsi_dh_data->kref, __detach_handler); in scsi_dh_handler_detach()
|
D | scsi_dh_rdac.c | 154 struct kref kref; member 361 static void release_controller(struct kref *kref) in release_controller() argument 364 ctlr = container_of(kref, struct rdac_controller, kref); in release_controller() 379 kref_get(&tmp->kref); in get_controller() 393 kref_init(&ctlr->kref); in get_controller() 870 kref_put(&h->ctlr->kref, release_controller); in rdac_bus_attach() 887 kref_put(&h->ctlr->kref, release_controller); in rdac_bus_detach()
|
/linux-4.1.27/drivers/macintosh/ |
D | windfarm_core.c | 151 static void wf_control_release(struct kref *kref) in wf_control_release() argument 153 struct wf_control *ct = container_of(kref, struct wf_control, ref); in wf_control_release() 299 static void wf_sensor_release(struct kref *kref) in wf_sensor_release() argument 301 struct wf_sensor *sr = container_of(kref, struct wf_sensor, ref); in wf_sensor_release()
|
D | windfarm.h | 42 struct kref ref; 112 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.1.27/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 | 173 struct kref kref; member
|
/linux-4.1.27/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 | 125 static void drm_master_destroy(struct kref *kref) in drm_master_destroy() argument 127 struct drm_master *master = container_of(kref, struct drm_master, refcount); in drm_master_destroy() 631 static void drm_dev_release(struct kref *ref) in drm_dev_release()
|
D | drm_gem.c | 764 drm_gem_object_free(struct kref *kref) in drm_gem_object_free() argument 766 struct drm_gem_object *obj = (struct drm_gem_object *) kref; in drm_gem_object_free()
|
/linux-4.1.27/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.1.27/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.1.27/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 665 kref_init(&rbdc->kref); in rbd_client_create() 698 kref_get(&rbdc->kref); in __rbd_get_client() 840 static void rbd_client_release(struct kref *kref) in rbd_client_release() argument 842 struct rbd_client *rbdc = container_of(kref, struct rbd_client, kref); in rbd_client_release() 860 kref_put(&rbdc->kref, rbd_client_release); in rbd_put_client() 1471 atomic_read(&obj_request->kref.refcount)); in rbd_obj_request_get() [all …]
|
/linux-4.1.27/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 …]
|
D | fc_exch.c | 98 struct kref kref; member 2295 kref_get(&mp->kref); in fc_exch_mgr_add() 2304 static void fc_exch_mgr_destroy(struct kref *kref) in fc_exch_mgr_destroy() argument 2306 struct fc_exch_mgr *mp = container_of(kref, struct fc_exch_mgr, kref); in fc_exch_mgr_destroy() 2321 kref_put(&ema->mp->kref, fc_exch_mgr_destroy); in fc_exch_mgr_del() 2423 kref_init(&mp->kref); in fc_exch_mgr_alloc() 2434 kref_put(&mp->kref, fc_exch_mgr_destroy); in fc_exch_mgr_alloc()
|
/linux-4.1.27/drivers/gpu/drm/i915/ |
D | i915_gem_userptr.c | 40 struct kref kref; member 446 kref_init(&mm->kref); in i915_gem_userptr_init__mm_struct() 458 kref_get(&mm->kref); in i915_gem_userptr_init__mm_struct() 476 __i915_mm_struct_free(struct kref *kref) in __i915_mm_struct_free() argument 478 struct i915_mm_struct *mm = container_of(kref, typeof(*mm), kref); in __i915_mm_struct_free() 494 kref_put_mutex(&obj->userptr.mm->kref, in i915_gem_userptr_release__mm_struct()
|
D | i915_gem_gtt.h | 314 struct kref ref; 407 void i915_ppgtt_release(struct kref *kref);
|
/linux-4.1.27/drivers/tty/ |
D | tty_port.c | 32 kref_init(&port->kref); in tty_port_init() 139 static void tty_port_destructor(struct kref *kref) in tty_port_destructor() argument 141 struct tty_port *port = container_of(kref, struct tty_port, kref); in tty_port_destructor() 158 kref_put(&port->kref, tty_port_destructor); in tty_port_put()
|
/linux-4.1.27/include/video/ |
D | udlfb.h | 40 struct kref kref; member
|
/linux-4.1.27/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.1.27/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); 538 static void reada_zone_release(struct kref *kref) in reada_zone_release() argument 540 struct reada_zone *zone = container_of(kref, struct reada_zone, refcnt); in reada_zone_release() 548 static void reada_control_release(struct kref *kref) in reada_control_release() argument 550 struct reada_control *rc = container_of(kref, struct reada_control, in reada_control_release()
|
/linux-4.1.27/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) 118 static void usbtmc_delete(struct kref *kref) in usbtmc_delete() argument 120 struct usbtmc_device_data *data = to_usbtmc_data(kref); in usbtmc_delete() 138 kref_get(&data->kref); in usbtmc_open() 150 kref_put(&data->kref, usbtmc_delete); in usbtmc_release() 1114 kref_init(&data->kref); in usbtmc_probe() 1187 kref_put(&data->kref, usbtmc_delete); in usbtmc_probe() 1204 kref_put(&data->kref, usbtmc_delete); in usbtmc_disconnect()
|
/linux-4.1.27/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.1.27/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.1.27/drivers/remoteproc/ |
D | remoteproc_internal.h | 49 void rproc_release(struct kref *kref);
|
/linux-4.1.27/fs/ocfs2/cluster/ |
D | tcp_internal.h | 131 struct kref sc_kref; 202 struct kref nh_kref;
|
/linux-4.1.27/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.1.27/drivers/infiniband/hw/cxgb4/ |
D | iw_cxgb4.h | 663 ep, atomic_read(&((ep)->kref.refcount))); \ 664 WARN_ON(atomic_read(&((ep)->kref.refcount)) < 1); \ 665 kref_put(&((ep)->kref), _c4iw_free_ep); \ 670 ep, atomic_read(&((ep)->kref.refcount))); \ 671 kref_get(&((ep)->kref)); \ 673 void _c4iw_free_ep(struct kref *kref); 801 struct kref kref; member
|
/linux-4.1.27/fs/nfs/ |
D | direct.c | 74 struct kref kref; /* release manager */ member 308 kref_init(&dreq->kref); in nfs_direct_req_alloc() 309 kref_get(&dreq->kref); in nfs_direct_req_alloc() 320 static void nfs_direct_req_free(struct kref *kref) in nfs_direct_req_free() argument 322 struct nfs_direct_req *dreq = container_of(kref, struct nfs_direct_req, kref); in nfs_direct_req_free() 334 kref_put(&dreq->kref, nfs_direct_req_free); in nfs_direct_req_release()
|
/linux-4.1.27/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.1.27/fs/ceph/ |
D | mds_client.h | 247 struct kref r_kref; 376 extern void ceph_mdsc_release_request(struct kref *kref);
|
/linux-4.1.27/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.1.27/include/scsi/ |
D | osd_ore.h | 117 struct kref kref; member
|
D | scsi_device.h | 223 struct kref kref; member 275 struct kref reap_ref; /* last put renders target invisible */
|
D | libfc.h | 199 struct kref kref; member 704 void (*rport_destroy)(struct kref *);
|
/linux-4.1.27/drivers/scsi/lpfc/ |
D | lpfc_disc.h | 116 struct kref kref; member
|
/linux-4.1.27/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() 1598 kref_init(&dev->kref); /* matching kref_put in usb .disconnect fn */ in dlfb_usb_probe() 1634 kref_get(&dev->kref); /* matching kref_put in free_framebuffer_work */ in dlfb_usb_probe() 1648 kref_put(&dev->kref, dlfb_free); /* ref for framebuffer */ in dlfb_usb_probe() 1649 kref_put(&dev->kref, dlfb_free); /* last ref from kref_init */ in dlfb_usb_probe() 1769 kref_put(&dev->kref, dlfb_free); in dlfb_usb_disconnect()
|
/linux-4.1.27/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.1.27/drivers/gpu/drm/vmwgfx/ |
D | vmwgfx_resource.c | 87 kref_get(&res->kref); in vmw_resource_reference() 94 return kref_get_unless_zero(&res->kref) ? res : NULL; in vmw_resource_reference_unless_doomed() 116 static void vmw_resource_release(struct kref *kref) in vmw_resource_release() argument 119 container_of(kref, struct vmw_resource, kref); in vmw_resource_release() 171 kref_put(&res->kref, vmw_resource_release); in vmw_resource_unreference() 220 kref_init(&res->kref); in vmw_resource_init() 271 kref_get(&res->kref); in vmw_resource_lookup() 322 kref_get(&res->kref); in vmw_user_resource_lookup_handle()
|
/linux-4.1.27/Documentation/watchdog/ |
D | watchdog-kernel-api.txt | 111 1) Add a kref struct to the same structure which is holding the watchdog_device 112 2) Define a release callback for the kref which frees the struct holding both 113 3) Call kref_init on this kref *before* calling watchdog_register_device() 114 4) Define a ref operation calling kref_get on this kref 115 5) Define a unref operation calling kref_put on this kref 118 * *After* calling watchdog_unregister_device() call kref_put on the kref 160 * ref: the operation that calls kref_get on the kref of a dynamically 162 * unref: the operation that calls kref_put on the kref of a dynamically
|
/linux-4.1.27/drivers/scsi/cxgbi/ |
D | libcxgbi.h | 128 struct kref refcnt; 212 struct kref refcnt; 360 static inline void cxgbi_sock_free(struct kref *kref) in cxgbi_sock_free() argument 362 struct cxgbi_sock *csk = container_of(kref, in cxgbi_sock_free()
|
/linux-4.1.27/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.1.27/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() 1588 kref_init(&icom_adapter->kref); in icom_probe() 1612 kref_put(&icom_adapter->kref, icom_kref_release); in icom_remove()
|
/linux-4.1.27/drivers/infiniband/ulp/isert/ |
D | ib_isert.h | 177 struct kref kref; member
|
/linux-4.1.27/drivers/staging/fwserial/ |
D | fwserial.h | 325 struct kref kref; member
|
/linux-4.1.27/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.1.27/drivers/gpu/drm/nouveau/nvif/ |
D | object.c | 289 nvif_object_put(struct kref *kref) in nvif_object_put() argument 292 container_of(kref, typeof(*object), refcount); in nvif_object_put()
|
/linux-4.1.27/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.1.27/drivers/scsi/bnx2fc/ |
D | bnx2fc.h | 260 struct kref kref; member 425 struct kref refcount; 492 void bnx2fc_cmd_release(struct kref *ref);
|
/linux-4.1.27/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.1.27/init/ |
D | version.c | 26 .kref = {
|
/linux-4.1.27/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.1.27/drivers/scsi/csiostor/ |
D | csio_lnode.h | 88 struct kref kref; member
|
D | csio_lnode.c | 1335 csio_free_fcfinfo(struct kref *kref) in csio_free_fcfinfo() argument 1337 struct csio_fcf_info *fcfinfo = container_of(kref, in csio_free_fcfinfo() 1338 struct csio_fcf_info, kref); in csio_free_fcfinfo() 1994 kref_init(&ln->fcfinfo->kref); in csio_ln_init() 2010 kref_get(&pln->fcfinfo->kref); in csio_ln_init() 2022 kref_init(&ln->fcfinfo->kref); in csio_ln_init() 2043 kref_put(&pln->fcfinfo->kref, csio_free_fcfinfo); in csio_ln_exit() 2045 kref_put(&ln->fcfinfo->kref, csio_free_fcfinfo); in csio_ln_exit()
|
/linux-4.1.27/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() 3350 kref_put(&tgt->kref, ibmvfc_release_tgt); in ibmvfc_tgt_prli_done() 3369 kref_get(&tgt->kref); in ibmvfc_tgt_send_prli() 3389 kref_put(&tgt->kref, ibmvfc_release_tgt); in ibmvfc_tgt_send_prli() 3446 kref_put(&tgt->kref, ibmvfc_release_tgt); in ibmvfc_tgt_plogi_done() [all …]
|
/linux-4.1.27/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.1.27/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.1.27/include/linux/sunrpc/ |
D | cache.h | 54 struct kref ref; 82 void (*cache_put)(struct kref *);
|
/linux-4.1.27/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.1.27/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.1.27/drivers/usb/mon/ |
D | usb_mon.h | 32 struct kref ref; /* Under mon_lock */
|
/linux-4.1.27/drivers/target/iscsi/ |
D | iscsi_target.h | 10 extern void iscsit_login_kref_put(struct kref *);
|
/linux-4.1.27/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.1.27/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.1.27/drivers/dma/ |
D | dmaengine.c | 1017 static void dmaengine_unmap(struct kref *kref) in dmaengine_unmap() argument 1019 struct dmaengine_unmap_data *unmap = container_of(kref, typeof(*unmap), kref); in dmaengine_unmap() 1045 kref_put(&unmap->kref, dmaengine_unmap); in dmaengine_unmap_put() 1102 kref_init(&unmap->kref); in dmaengine_get_unmap_data()
|
/linux-4.1.27/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.1.27/drivers/s390/crypto/ |
D | zcrypt_api.h | 104 struct kref refcount; /* device refcounting */
|
/linux-4.1.27/include/linux/mtd/ |
D | blktrans.h | 44 struct kref ref;
|
/linux-4.1.27/drivers/infiniband/hw/usnic/ |
D | usnic_ib.h | 65 struct kref vf_cnt;
|
/linux-4.1.27/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.1.27/fs/cifs/ |
D | smb2proto.h | 133 void (*release)(struct kref *kref));
|
D | cifsproto.h | 498 void cifs_readdata_release(struct kref *refcount); 503 void (*release)(struct kref *kref)); 507 void cifs_writedata_release(struct kref *refcount);
|
/linux-4.1.27/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.1.27/drivers/hid/ |
D | wacom_sys.c | 458 struct kref kref; member 498 kref_get(&data->kref); in wacom_get_hdev_data() 523 kref_init(&data->kref); in wacom_add_shared_data() 540 static void wacom_release_shared_data(struct kref *kref) in wacom_release_shared_data() argument 543 container_of(kref, struct wacom_hdev_data, kref); in wacom_release_shared_data() 566 kref_put(&data->kref, wacom_release_shared_data); in wacom_remove_shared_data()
|
/linux-4.1.27/net/mac802154/ |
D | llsec.h | 35 struct kref ref;
|
/linux-4.1.27/include/linux/iio/ |
D | buffer.h | 93 struct kref ref;
|
/linux-4.1.27/drivers/xen/ |
D | xen-scsiback.c | 88 struct kref kref; member 319 static void scsiback_free_translation_entry(struct kref *kref) in scsiback_free_translation_entry() argument 321 struct v2p_entry *entry = container_of(kref, struct v2p_entry, kref); in scsiback_free_translation_entry() 369 kref_put(&pending_req->v2p->kref, in scsiback_do_resp_with_sense() 651 kref_get(&entry->kref); in scsiback_do_translation() 934 kref_init(&new->kref); in scsiback_add_translation_entry() 957 kref_put(&entry->kref, scsiback_free_translation_entry); in __scsiback_del_translation_entry()
|
/linux-4.1.27/drivers/media/usb/em28xx/ |
D | em28xx.h | 509 struct kref ref; 601 struct kref ref; 785 void em28xx_free_device(struct kref *ref);
|
/linux-4.1.27/sound/pci/hda/ |
D | hda_codec.h | 203 struct kref kref; member 443 kref_get(&pcm->kref); in snd_hda_codec_pcm_get()
|
/linux-4.1.27/drivers/usb/gadget/legacy/ |
D | tcm_usb_gadget.h | 84 struct kref ref;
|
/linux-4.1.27/drivers/pinctrl/ |
D | core.h | 72 struct kref users;
|
/linux-4.1.27/drivers/gpu/drm/nouveau/ |
D | nouveau_fence.h | 33 struct kref fence_ref;
|
/linux-4.1.27/arch/powerpc/include/asm/ |
D | spu.h | 226 struct kref *prof_info_kref, 227 void ( * prof_info_release) (struct kref *kref));
|