/linux-4.4.14/include/media/ |
H A D | videobuf2-memops.h | 21 * struct vb2_vmarea_handler - common vma refcount tracking handler 23 * @refcount: pointer to refcount entry in the buffer 24 * @put: callback to function that decreases buffer refcount 28 atomic_t *refcount; member in struct:vb2_vmarea_handler
|
/linux-4.4.14/include/linux/ |
H A D | kref.h | 24 atomic_t refcount; member in struct:kref 33 atomic_set(&kref->refcount, 1); kref_init() 37 * kref_get - increment refcount for object. 42 /* If refcount was 0 before incrementing then we have a race kref_get() 46 WARN_ON_ONCE(atomic_inc_return(&kref->refcount) < 2); kref_get() 61 * Subtract @count from the refcount, and if 0, call release(). 72 if (atomic_sub_and_test((int) count, &kref->refcount)) { 80 * kref_put - decrement refcount for object. 90 * Decrement the refcount, and if 0, call release(). 106 if (unlikely(!atomic_add_unless(&kref->refcount, -1, 1))) { kref_put_mutex() 108 if (unlikely(!atomic_dec_and_test(&kref->refcount))) { kref_put_mutex() 119 * kref_get_unless_zero - Increment refcount for object unless it is zero. 136 return atomic_add_unless(&kref->refcount, 1, 0); kref_get_unless_zero()
|
H A D | percpu-refcount.h | 6 * This implements a refcount with similar semantics to atomic_t - atomic_inc(), 10 * refcounts; you have to keep track of your initial refcount, and then when you 12 * refcount. 14 * The refcount will have a range of 0 to ((1U << 31) - 1), i.e. one bit less 19 * refcount hitting 0 - it can't, if it was in percpu mode. percpu_ref_kill() 38 * explicit synchronization to ensure the initial refcount can only be dropped 111 * Must be used to drop the initial ref on a percpu refcount; must be called 123 * Internal helper. Don't use outside percpu-refcount proper. The 162 * percpu_ref_get_many - increment a percpu refcount 185 * percpu_ref_get - increment a percpu refcount 198 * percpu_ref_tryget - try to increment a percpu refcount 201 * Increment a percpu refcount unless its count already reached zero. 226 * percpu_ref_tryget_live - try to increment a live percpu refcount 229 * Increment a percpu refcount unless it has already been killed. Returns 260 * percpu_ref_put_many - decrement a percpu refcount 264 * Decrement the refcount, and if 0, call the release function (which was passed 284 * percpu_ref_put - decrement a percpu refcount 287 * Decrement the refcount, and if 0, call the release function (which was passed 298 * percpu_ref_is_dying - test whether a percpu refcount is dying or dead 312 * percpu_ref_is_zero - test whether a percpu refcount reached zero
|
H A D | cpu_rmap.h | 20 * @refcount: kref for object 28 struct kref refcount; member in struct:cpu_rmap
|
H A D | fence.h | 39 * @refcount: refcount for this fence 73 struct kref refcount; member in struct:fence 185 * fence_get - increases refcount of the fence 186 * @fence: [in] fence to increase refcount of 188 * Returns the same fence, with refcount increased by 1. 193 kref_get(&fence->refcount); fence_get() 199 * @fence: [in] fence to increase refcount of 201 * Function returns NULL if no refcount could be obtained, or the fence. 205 if (kref_get_unless_zero(&fence->refcount)) fence_get_rcu() 212 * fence_put - decreases refcount of the fence 213 * @fence: [in] fence to reduce refcount of 218 kref_put(&fence->refcount, fence_release); fence_put()
|
H A D | iocontext.h | 98 atomic_long_t refcount; member in struct:io_context 130 WARN_ON_ONCE(atomic_long_read(&ioc->refcount) <= 0); get_io_context_active() 132 atomic_long_inc(&ioc->refcount); get_io_context_active()
|
H A D | backing-dev-defs.h | 9 #include <linux/percpu-refcount.h> 196 * wb_tryget - try to increment a wb's refcount 207 * wb_get - increment a wb's refcount 217 * wb_put - decrement a wb's refcount
|
H A D | rmap.h | 31 * The refcount is taken on an anon_vma when there is no 37 atomic_t refcount; member in struct:anon_vma 100 atomic_inc(&anon_vma->refcount); get_anon_vma() 107 if (atomic_dec_and_test(&anon_vma->refcount)) put_anon_vma()
|
H A D | slab_def.h | 43 int refcount; member in struct:kmem_cache
|
H A D | pagemap.h | 126 * 2. conditionally increment refcount 131 * A. atomically check refcount is correct and set it to 0 (atomic_cmpxchg) 136 * - 2 runs before A: in this case, A sees elevated refcount and bails out 137 * - A runs before 2: in this case, 2 sees zero refcount and retries; 163 * found a page in the radix tree here, we have pinned its refcount by page_cache_get_speculative() 269 * page cache page, it is returned with an increased refcount. 293 * refcount. 313 * refcount. 317 * returned locked and with an increased refcount.
|
H A D | mmu_notifier.h | 124 * range are still mapped and have at least a refcount of one. 135 * by the driver) must make sure that the refcount is kept 138 * If the driver increases the refcount when the pages are 141 * decrease the refcount. If the refcount is decreased on 143 * table entries are removed. If the refcount is only 145 * will drop the last refcount but it must take care to flush 149 * the last refcount is dropped.
|
H A D | zpool.h | 83 atomic_t refcount; member in struct:zpool_driver
|
H A D | seqno-fence.h | 75 * The seqno_fence will take a refcount on the sync_buf until it's
|
H A D | slub_def.h | 77 int refcount; /* Refcount for slab cache destroy */ member in struct:kmem_cache
|
H A D | relay.h | 42 struct kref kref; /* channel buffer refcount */ 63 struct kref kref; /* channel refcount */
|
/linux-4.4.14/drivers/media/v4l2-core/ |
H A D | videobuf2-memops.c | 84 * vb2_common_vm_open() - increase refcount of the vma 94 pr_debug("%s: %p, refcount: %d, vma: %08lx-%08lx\n", vb2_common_vm_open() 95 __func__, h, atomic_read(h->refcount), vma->vm_start, vb2_common_vm_open() 98 atomic_inc(h->refcount); vb2_common_vm_open() 102 * vb2_common_vm_close() - decrease refcount of the vma 112 pr_debug("%s: %p, refcount: %d, vma: %08lx-%08lx\n", vb2_common_vm_close() 113 __func__, h, atomic_read(h->refcount), vma->vm_start, vb2_common_vm_close() 120 * vb2_common_vm_ops - common vm_ops used for tracking refcount of mmaped
|
H A D | videobuf2-vmalloc.c | 29 atomic_t refcount; member in struct:vb2_vmalloc_buf 48 buf->handler.refcount = &buf->refcount; vb2_vmalloc_alloc() 58 atomic_inc(&buf->refcount); vb2_vmalloc_alloc() 66 if (atomic_dec_and_test(&buf->refcount)) { vb2_vmalloc_put() 161 return atomic_read(&buf->refcount); vb2_vmalloc_num_users() 186 * Use common vm_area operations to track buffer refcount. vb2_vmalloc_mmap() 368 atomic_inc(&buf->refcount); vb2_vmalloc_get_dmabuf()
|
H A D | videobuf2-dma-sg.c | 53 atomic_t refcount; member in struct:vb2_dma_sg_buf 155 buf->handler.refcount = &buf->refcount; vb2_dma_sg_alloc() 159 atomic_inc(&buf->refcount); vb2_dma_sg_alloc() 185 if (atomic_dec_and_test(&buf->refcount)) { vb2_dma_sg_put() 335 return atomic_read(&buf->refcount); vb2_dma_sg_num_users() 365 * Use common vm_area operations to track buffer refcount. vb2_dma_sg_mmap() 545 atomic_inc(&buf->refcount); vb2_dma_sg_get_dmabuf()
|
H A D | videobuf2-dma-contig.c | 39 atomic_t refcount; member in struct:vb2_dc_buf 91 return atomic_read(&buf->refcount); vb2_dc_num_users() 127 if (!atomic_dec_and_test(&buf->refcount)) vb2_dc_put() 163 buf->handler.refcount = &buf->refcount; vb2_dc_alloc() 167 atomic_inc(&buf->refcount); vb2_dc_alloc() 404 atomic_inc(&buf->refcount); vb2_dc_get_dmabuf()
|
/linux-4.4.14/drivers/gpu/drm/ |
H A D | drm_global.c | 39 int refcount; member in struct:drm_global_item 52 item->refcount = 0; drm_global_init() 62 BUG_ON(item->refcount != 0); drm_global_release() 72 if (item->refcount == 0) { drm_global_item_ref() 85 ++item->refcount; drm_global_item_ref() 101 BUG_ON(item->refcount == 0); drm_global_item_unref() 103 if (--item->refcount == 0) { drm_global_item_unref()
|
H A D | drm_irq.c | 255 * vbl_lock locked to prevent drm_vblank_get(), so the vblank refcount drm_update_vblank_count() 256 * can't increase while we are executing. Therefore a zero refcount at drm_update_vblank_count() 259 * we must also accept a refcount of 1, as whenever we are called from drm_update_vblank_count() 260 * drm_vblank_get() -> drm_vblank_enable() the refcount will be 1 and drm_update_vblank_count() 267 * the refcount is currently zero, as vblank irqs are usually only drm_update_vblank_count() 270 * bumps in vblank refcount. Therefore also restrict bumps to +1 when drm_update_vblank_count() 273 if ((diff > 1) && (atomic_read(&vblank->refcount) > 1 || drm_update_vblank_count() 276 "refcount %u, vblirq %u\n", pipe, diff, drm_update_vblank_count() 277 atomic_read(&vblank->refcount), drm_update_vblank_count() 352 if (atomic_read(&vblank->refcount) == 0 && vblank->enabled) { vblank_disable_fn() 1179 atomic_dec(&vblank->refcount); drm_vblank_enable() 1218 if (atomic_add_return(1, &vblank->refcount) == 1) { drm_vblank_get() 1222 atomic_dec(&vblank->refcount); drm_vblank_get() 1267 if (WARN_ON(atomic_read(&vblank->refcount) == 0)) drm_vblank_put() 1271 if (atomic_dec_and_test(&vblank->refcount)) { drm_vblank_put() 1385 * the vblank interrupt by bumping the refcount. drm_vblank_off() 1388 atomic_inc(&vblank->refcount); drm_vblank_off() 1449 * interrupt by bumping the refcount. drm_crtc_vblank_reset() 1452 atomic_inc(&vblank->refcount); drm_crtc_vblank_reset() 1485 /* Drop our private "prevent drm_vblank_get" refcount */ drm_vblank_on() 1487 atomic_dec(&vblank->refcount); drm_vblank_on() 1497 if (atomic_read(&vblank->refcount) != 0 || drm_vblank_offdelay == 0) drm_vblank_on() 1740 * the vblank interrupt refcount afterwards. (vblank IRQ disable follows that
|
H A D | drm_info.c | 206 atomic_read(&obj->refcount.refcount)); drm_gem_one_name_info() 215 seq_printf(m, " name size handles refcount\n"); drm_gem_name_info()
|
H A D | drm_crtc.c | 411 kref_init(&fb->refcount); drm_framebuffer_init() 443 container_of(kref, struct drm_framebuffer, refcount); drm_framebuffer_free() 494 if (!kref_get_unless_zero(&fb->refcount)) drm_framebuffer_lookup() 507 * This functions decrements the fb's refcount and frees it if it drops to zero. 511 DRM_DEBUG("%p: FB ID: %d (%d)\n", fb, fb->base.id, atomic_read(&fb->refcount.refcount)); drm_framebuffer_unreference() 512 kref_put(&fb->refcount, drm_framebuffer_free); drm_framebuffer_unreference() 520 * This functions increments the fb's refcount. 524 DRM_DEBUG("%p: FB ID: %d (%d)\n", fb, fb->base.id, atomic_read(&fb->refcount.refcount)); drm_framebuffer_reference() 525 kref_get(&fb->refcount); drm_framebuffer_reference() 614 * Since we're holding a reference ourselves, observing a refcount of 1 drm_framebuffer_remove() 615 * means that we're the last holder and can skip it. Also, the refcount drm_framebuffer_remove() 624 if (atomic_read(&fb->refcount.refcount) > 1) { drm_framebuffer_remove() 2529 * connectors from it), hence we need to refcount the fbs across all drm_mode_set_config_internal() 3384 if (atomic_read(&fb->refcount.refcount) > 1) { drm_mode_rmfb() 3577 if (atomic_read(&fb->refcount.refcount) > 1) { drm_fb_release() 4215 kref_init(&blob->refcount); drm_property_create_blob() 4236 container_of(kref, struct drm_property_blob, refcount); drm_property_free_blob() 4263 DRM_DEBUG("%p: blob ID: %d (%d)\n", blob, blob->base.id, atomic_read(&blob->refcount.refcount)); drm_property_unreference_blob() 4265 if (kref_put_mutex(&blob->refcount, drm_property_free_blob, drm_property_unreference_blob() 4286 DRM_DEBUG("%p: blob ID: %d (%d)\n", blob, blob->base.id, atomic_read(&blob->refcount.refcount)); drm_property_unreference_blob_locked() 4288 kref_put(&blob->refcount, drm_property_free_blob); drm_property_unreference_blob_locked() 4320 DRM_DEBUG("%p: blob ID: %d (%d)\n", blob, blob->base.id, atomic_read(&blob->refcount.refcount)); drm_property_reference_blob() 4321 kref_get(&blob->refcount); drm_property_reference_blob() 4366 if (!kref_get_unless_zero(&blob->refcount)) drm_property_lookup_blob() 5825 drm_framebuffer_free(&fb->refcount); drm_mode_config_cleanup() 5871 struct drm_tile_group *tg = container_of(kref, struct drm_tile_group, refcount); drm_tile_group_free() 5889 kref_put(&tg->refcount, drm_tile_group_free); drm_mode_put_tile_group() 5910 if (!kref_get_unless_zero(&tg->refcount)) drm_mode_get_tile_group() 5942 kref_init(&tg->refcount); drm_mode_create_tile_group()
|
H A D | drm_gem.c | 168 kref_init(&obj->refcount); drm_gem_private_object_init() 259 * doing the delete on it and dropping the refcount, or the user drm_gem_handle_delete() 260 * could race us to double-decrement the refcount and cause a drm_gem_handle_delete() 275 /* Release reference and decrement refcount. */ drm_gem_handle_delete() 767 container_of(kref, struct drm_gem_object, refcount); drm_gem_object_free() 888 if (!kref_get_unless_zero(&obj->refcount)) drm_gem_mmap()
|
/linux-4.4.14/drivers/gpu/drm/nouveau/include/nvkm/subdev/ |
H A D | mmu.h | 10 u32 refcount[2]; member in struct:nvkm_vm_pgt 20 int refcount; member in struct:nvkm_vma 32 struct kref refcount; member in struct:nvkm_vm
|
/linux-4.4.14/drivers/base/power/ |
H A D | common.c | 18 * dev_pm_get_subsys_data - Create or refcount power.subsys_data for device. 22 * its reference counter. Return 0 if new object has been created or refcount 36 dev->power.subsys_data->refcount++; dev_pm_get_subsys_data() 39 psd->refcount = 1; dev_pm_get_subsys_data() 71 if (--psd->refcount == 0) dev_pm_put_subsys_data()
|
/linux-4.4.14/drivers/md/bcache/ |
H A D | closure.h | 15 * They embed a refcount. The basic idea is they count "things that are in 19 * The refcount may be manipulated with closure_get() and closure_put(). 21 * the refcount to go to 0. 26 * refcount hits 1. 37 * To use safely closures asynchronously, they must always have a refcount while 60 * If closure's refcount started at 0, complete_some_read() could run before the 66 * So, closure_init() initializes a closure's refcount to 1 - and when a 67 * closure_fn is run, the refcount will be reset to 1 first. 69 * Then, the rule is - if you got the refcount with closure_get(), release it 70 * with closure_put() (i.e, in a bio->bi_endio function). If you have a refcount 87 * If parent is non null, the new closure will have a refcount for its lifetime; 88 * a closure is considered to be "finished" when its refcount hits 0 and the 98 * struct (which its refcount will normally control the lifetime of), and that 260 * closure_get - increment a closure's refcount 273 * closure_init - Initialize a closure, setting the refcount to 1 275 * @parent: parent of the new closure. cl will take a refcount on it for its
|
H A D | journal.h | 34 * We track this by maintaining a refcount for every open journal entry, in a 36 * entry/sequence number. When the refcount at the tail of the fifo goes to 40 * We take a refcount on a journal entry when we add some keys to a journal 43 * copy of that refcount (held by struct btree_write). That refcount is dropped 46 * A struct btree_write can only hold a refcount on a single journal entry, but 48 * it always has a refcount on the _oldest_ journal entry of all the journal
|
H A D | closure.c | 53 * closure_put - decrement a closure's refcount 117 * Sleeps until the refcount hits 1 - the thread that's running the closure owns 118 * the last refcount.
|
H A D | btree.h | 67 * though - but it takes a refcount on the closure in struct btree_op you passed 108 * btree node indicating it was freed; it takes a refcount on 111 * refcount that btree_split() took.
|
/linux-4.4.14/drivers/gpu/host1x/ |
H A D | channel.c | 54 if (channel->refcount == 0) host1x_channel_get() 58 channel->refcount++; host1x_channel_get() 70 if (channel->refcount == 1) { host1x_channel_put() 77 channel->refcount--; host1x_channel_put()
|
H A D | intr.c | 40 kfree(container_of(kref, struct host1x_waitlist, refcount)); waiter_release() 93 kref_put(&waiter->refcount, waiter_release); list_for_each_entry_safe() 156 kref_put(&waiter->refcount, waiter_release); list_for_each_entry_safe() 226 kref_init(&waiter->refcount); host1x_intr_add_action() 228 kref_get(&waiter->refcount); host1x_intr_add_action() 270 kref_put(&waiter->refcount, waiter_release); host1x_intr_put_ref() 338 kref_put(&waiter->refcount, waiter_release); host1x_intr_stop()
|
H A D | channel.h | 31 unsigned int refcount; member in struct:host1x_channel
|
H A D | intr.h | 58 struct kref refcount; member in struct:host1x_waitlist
|
H A D | debug.c | 51 if (ch->refcount) { show_channels()
|
/linux-4.4.14/init/ |
H A D | version.c | 27 .refcount = ATOMIC_INIT(2),
|
/linux-4.4.14/drivers/staging/rdma/ipath/ |
H A D | ipath_verbs_mcast.c | 61 atomic_inc(&qp->refcount); ipath_mcast_qp_alloc() 72 if (atomic_dec_and_test(&qp->refcount)) ipath_mcast_qp_free() 95 atomic_set(&mcast->refcount, 0); ipath_mcast_alloc() 140 atomic_inc(&mcast->refcount); ipath_mcast_find() 223 atomic_inc(&mcast->refcount); ipath_mcast_add() 342 wait_event(mcast->wait, atomic_read(&mcast->refcount) <= 1); ipath_multicast_detach() 346 atomic_dec(&mcast->refcount); ipath_multicast_detach() 347 wait_event(mcast->wait, !atomic_read(&mcast->refcount)); ipath_multicast_detach()
|
H A D | ipath_verbs.c | 662 if (atomic_dec_return(&mcast->refcount) <= 1) ipath_ib_rcv() 674 if (atomic_dec_and_test(&qp->refcount)) ipath_ib_rcv() 712 atomic_inc(&qp->refcount); ipath_ib_timer() 722 atomic_inc(&qp->refcount); ipath_ib_timer() 775 if (atomic_dec_and_test(&qp->refcount)) ipath_ib_timer() 788 if (atomic_dec_and_test(&qp->refcount)) ipath_ib_timer() 1070 if (atomic_dec_and_test(&qp->refcount)) sdma_complete() 1151 atomic_inc(&qp->refcount); ipath_verbs_send_dma() 1228 if (atomic_dec_and_test(&qp->refcount)) ipath_verbs_send_dma() 1489 atomic_inc(&qp->refcount); ipath_ib_piobufavail() 1503 if (atomic_dec_and_test(&qp->refcount)) ipath_ib_piobufavail()
|
H A D | ipath_qp.c | 225 atomic_inc(&qp->refcount); ipath_alloc_qpn() 255 atomic_dec(&qp->refcount); ipath_free_qp() 309 atomic_inc(&qp->refcount); ipath_lookup_qpn() 845 atomic_set(&qp->refcount, 0); ipath_create_qp() 987 atomic_dec(&qp->refcount); ipath_destroy_qp() 996 wait_event(qp->wait, !atomic_read(&qp->refcount)); ipath_destroy_qp()
|
/linux-4.4.14/ipc/ |
H A D | namespace.c | 110 * it is dropping the refcount to 0, then it can race with 113 * with one of the mqueuefs files. That can raise the refcount. 114 * So dropping the refcount, and raising the refcount when 117 * (Clearly, a task raising the refcount on its own ipc_ns
|
H A D | util.h | 52 atomic_t refcount; shm_exit_ns() member in struct:ipc_rcu 126 * getref increases the refcount, the putref call that reduces the recount
|
/linux-4.4.14/drivers/media/common/siano/ |
H A D | smsdvb-debugfs.c | 39 struct kref refcount; member in struct:smsdvb_debugfs 341 kref_get(&debug_data->refcount); smsdvb_stats_open() 357 debug_data = container_of(ref, struct smsdvb_debugfs, refcount); smsdvb_debugfs_data_release() 382 kref_get(&debug_data->refcount); smsdvb_stats_poll() 390 kref_put(&debug_data->refcount, smsdvb_debugfs_data_release); smsdvb_stats_poll() 401 kref_get(&debug_data->refcount); smsdvb_stats_read() 434 kref_put(&debug_data->refcount, smsdvb_debugfs_data_release); smsdvb_stats_read() 447 kref_put(&debug_data->refcount, smsdvb_debugfs_data_release); smsdvb_stats_release() 500 kref_init(&debug_data->refcount); smsdvb_debugfs_create() 515 kref_put(&client->debug_data->refcount, smsdvb_debugfs_data_release); smsdvb_debugfs_release()
|
/linux-4.4.14/drivers/staging/lustre/lnet/lnet/ |
H A D | module.c | 69 int refcount; lnet_unconfigure() local 79 refcount = the_lnet.ln_refcount; lnet_unconfigure() 83 return (refcount == 0) ? 0 : -EBUSY; lnet_unconfigure()
|
/linux-4.4.14/fs/ocfs2/ |
H A D | refcounttree.h | 63 * Some refcount caller need to do more work after we modify the data b-tree 64 * during refcount operation(including CoW and add refcount flag), and make the
|
H A D | refcounttree.c | 98 mlog(ML_ERROR, "Checksum failed for refcount block %llu\n", ocfs2_validate_refcount_block() 241 mlog(ML_ERROR, "Duplicate refcount block %llu found!\n", ocfs2_insert_refcount_tree() 356 * We need the generation to create the refcount tree lock and since ocfs2_get_refcount_tree() 360 * refcount block may have the stale data. It can only be trusted when ocfs2_get_refcount_tree() 361 * we hold the refcount lock. ocfs2_get_refcount_tree() 443 * Lock the refcount tree pointed by ref_blkno and return the tree. 444 * In most case, we lock the tree and read the refcount block. 487 * If the refcount block has been freed and re-created, we may need ocfs2_lock_refcount_tree() 488 * to recreate the refcount tree also. ocfs2_lock_refcount_tree() 493 * the new refcount tree for us. ocfs2_lock_refcount_tree() 504 * We get an extra reference when we create the refcount ocfs2_lock_refcount_tree() 554 * Create a refcount tree for an inode. 668 * We've just created a new refcount tree in this block. If ocfs2_create_refcount_tree() 669 * we found a refcount tree on the ocfs2_super, it must be ocfs2_create_refcount_tree() 925 * Try to remove refcount tree. The mechanism is: 961 * Find the end range for a leaf refcount block indicated by 990 * be stored in this leaf refcount block. ocfs2_get_refcount_cpos_end() 1058 * Given a cpos and len, try to find the refcount record which contains cpos. 1059 * 1. If cpos can be found in one refcount record, return the record. 1104 "refcount tree %llu has non zero tree depth in leaf btree tree block %llu\n", ocfs2_get_refcount_rec() 1215 * Merge the refcount rec if we are contiguous with the adjacent recs. 1238 * Change the refcount indexed by "index" in ref_bh. 1239 * If refcount reaches 0, remove it. 1411 * The refcount cpos are ordered by their 64bit cpos, 1415 * Note: The refcount block is already sorted by their low 32 bit cpos, 1478 * 2. call ocfs2_insert_extent to insert the new refcount block. ocfs2_divide_leaf_refcount_block() 1479 * 3. move the refcount rec to the new block. ocfs2_divide_leaf_refcount_block() 1495 /* move refcount records starting from split_index to the new block. */ ocfs2_divide_leaf_refcount_block() 1642 /* Now add a new refcount block into the tree.*/ ocfs2_expand_refcount_tree() 1655 * Only called when we have inserted a new refcount rec at index 0 1697 * 2 more credits, one for the leaf refcount block, one for ocfs2_adjust_refcount_rec() 1824 * split_rec is the new refcount rec we want to insert. 1825 * If split_rec->r_refcount > 0, we are changing the refcount(in case we 1826 * increase refcount or decrease a refcount to non-zero). 1827 * If split_rec->r_refcount == 0, we are punching a hole in current refcount 1828 * rec( in case we decrease a refcount to zero). 1873 * some refcount in it. ocfs2_split_refcount_rec() 2136 * check whether we need to restore the root refcount block if ocfs2_remove_refcount_extent() 2215 /* Remove the leaf refcount block if it contains no refcount record. */ ocfs2_decrease_refcount_rec() 2293 /* Caller must hold refcount tree lock. */ ocfs2_decrease_refcount() 2338 * This adds the refcount extent flag. 2358 ret = ocfs2_error(inode->i_sb, "Inode %lu want to use refcount tree, but the feature bit is not set in the super block\n", ocfs2_mark_extent_refcounted() 2375 * for modifying their refcount. 2433 * same refcount block, so that we can tell exactly whether ocfs2_calc_refcount_meta_credits() 2434 * we need a new refcount block or not. ocfs2_calc_refcount_meta_credits() 2440 * If the refcount rec already exists, that would be a little ocfs2_calc_refcount_meta_credits() 2517 * For refcount tree, we will decrease some contiguous clusters 2518 * refcount count, so just go through it to see how many blocks 2521 * Normally the refcount blocks store these refcount should be 2523 * We will at most add split 2 refcount records and 2 more 2524 * refcount blocks, so just check it in a rough way. 2526 * Caller must hold refcount tree lock. 2542 ret = ocfs2_error(inode->i_sb, "Inode %lu want to use refcount tree, but the feature bit is not set in the super block\n", ocfs2_prepare_refcount_change_for_del() 2837 * num_clusters in data_tree "et" and change the refcount for the old 2838 * clusters(starting form p_cluster) in the refcount tree. 3261 * 1. If refcount == 1, remove the flag and don't COW. ocfs2_make_clusters_writable() 3262 * 2. If refcount > 1, allocate clusters. ocfs2_make_clusters_writable() 3365 return ocfs2_error(inode->i_sb, "Inode %lu want to use refcount tree, but the feature bit is not set in the super block\n", ocfs2_replace_cow() 3536 * refcount tree change if we truncate it to 0. 3578 * this refcount block or not, so just take the worst ocfs2_refcounted_xattr_delete_need() 3580 * one will split a refcount rec, so totally we need ocfs2_refcounted_xattr_delete_need() 3581 * clusters * 2 new refcount rec. ocfs2_refcounted_xattr_delete_need() 3682 * Insert a new extent into refcount tree and mark a extent rec
|
H A D | ocfs2_trace.h | 902 unsigned int clusters, unsigned int refcount), 903 TP_ARGS(blkno, index, cpos, clusters, refcount), 909 __field(unsigned int, refcount) 916 __entry->refcount = refcount; 919 __entry->cpos, __entry->clusters, __entry->refcount) 926 unsigned int count, unsigned int refcount), \ 927 TP_ARGS(blkno, index, cpos, count, refcount)) 933 unsigned int clusters, unsigned int refcount, 936 TP_ARGS(cpos, clusters, refcount, 941 __field(unsigned int, refcount) 949 __entry->refcount = refcount; 955 __entry->cpos, __entry->clusters, __entry->refcount, 1004 unsigned int r_clusters, unsigned int refcount, int index), 1005 TP_ARGS(recs_add, cpos, clusters, r_cpos, r_clusters, refcount, index), 1012 __field(unsigned int, refcount) 1021 __entry->refcount = refcount; 1027 __entry->refcount, __entry->index)
|
H A D | journal.h | 509 /* inode update, new refcount block and its allocation credits. */ 513 /* inode and the refcount block update. */ 517 * inode and the refcount block update. 523 /* 2 metadata alloc, 2 new blocks and root refcount block */
|
/linux-4.4.14/net/batman-adv/ |
H A D | types.h | 95 * @refcount: number of contexts the object is used 111 atomic_t refcount; member in struct:batadv_hard_iface 128 * @refcount: number of contexts the object is used 138 atomic_t refcount; member in struct:batadv_orig_ifinfo 187 * @refcount: number of context where this object is currently in use 194 atomic_t refcount; member in struct:batadv_orig_node_vlan 250 * @refcount: number of contexts the object is used 296 atomic_t refcount; member in struct:batadv_orig_node 331 * @refcount: number of contexts the object is used 339 atomic_t refcount; member in struct:batadv_gw_node 364 atomic_t refcount; member in struct:batadv_neigh_node 392 * @refcount: number of contexts the object is used 400 atomic_t refcount; member in struct:batadv_neigh_ifinfo 712 * @refcount: number of context where this object is currently in use 722 atomic_t refcount; member in struct:batadv_softif_vlan 887 * @refcount: number of contexts the object is used 900 atomic_t refcount; member in struct:batadv_bla_backbone_gw 911 * @refcount: number of contexts the object is used 921 atomic_t refcount; member in struct:batadv_bla_claim 933 * @refcount: number of contexts the object is used 942 atomic_t refcount; member in struct:batadv_tt_common_entry 977 * @refcount: number of contexts the object is used 984 atomic_t refcount; member in struct:batadv_tt_orig_list_entry 1029 * @refcount: number of contexts the object is used by 1037 atomic_t refcount; member in struct:batadv_nc_node 1047 * @refcount: number of contexts the object is used by 1057 atomic_t refcount; member in struct:batadv_nc_path 1187 * @refcount: number of contexts the object is used 1196 atomic_t refcount; member in struct:batadv_dat_entry 1229 * @refcount: number of contexts the object is used 1234 atomic_t refcount; member in struct:batadv_tvlv_container 1247 * @refcount: number of contexts the object is used 1261 atomic_t refcount; member in struct:batadv_tvlv_handler
|
H A D | hard-interface.h | 74 if (atomic_dec_and_test(&hard_iface->refcount)) batadv_hardif_free_ref() 88 if (!atomic_inc_not_zero(&hard_iface->refcount)) batadv_primary_if_get_selected()
|
H A D | originator.c | 78 if (!atomic_inc_not_zero(&tmp->refcount)) batadv_orig_node_vlan_get() 119 atomic_set(&vlan->refcount, 2); batadv_orig_node_vlan_new() 137 if (atomic_dec_and_test(&orig_vlan->refcount)) batadv_orig_node_vlan_free_ref() 186 if (atomic_dec_and_test(&neigh_ifinfo->refcount)) batadv_neigh_ifinfo_free_ref() 224 if (atomic_dec_and_test(&neigh_node->refcount)) batadv_neigh_node_free_ref() 254 if (router && !atomic_inc_not_zero(&router->refcount)) batadv_orig_router_get() 282 if (!atomic_inc_not_zero(&tmp->refcount)) batadv_orig_ifinfo_get() 322 !atomic_inc_not_zero(&if_outgoing->refcount)) { batadv_orig_ifinfo_new() 333 atomic_set(&orig_ifinfo->refcount, 2); batadv_orig_ifinfo_new() 363 if (!atomic_inc_not_zero(&tmp_neigh_ifinfo->refcount)) batadv_neigh_ifinfo_get() 401 if (if_outgoing && !atomic_inc_not_zero(&if_outgoing->refcount)) { batadv_neigh_ifinfo_new() 408 atomic_set(&neigh_ifinfo->refcount, 2); batadv_neigh_ifinfo_new() 444 if (!atomic_inc_not_zero(&tmp_neigh_node->refcount)) batadv_neigh_node_get() 479 if (!atomic_inc_not_zero(&hard_iface->refcount)) { batadv_neigh_node_new() 494 atomic_set(&neigh_node->refcount, 2); batadv_neigh_node_new() 535 if (atomic_dec_and_test(&orig_ifinfo->refcount)) batadv_orig_ifinfo_free_ref() 600 if (atomic_dec_and_test(&orig_node->refcount)) batadv_orig_node_free_ref() 672 atomic_set(&orig_node->refcount, 2); batadv_orig_node_new() 871 * Returns the current best neighbor, with refcount increased. 887 if (!atomic_inc_not_zero(&neigh->refcount)) batadv_find_best_neighbor()
|
H A D | gateway_client.c | 64 if (atomic_dec_and_test(&gw_node->refcount)) { batadv_gw_node_free_ref() 80 if (!atomic_inc_not_zero(&gw_node->refcount)) batadv_gw_get_selected_gw_node() 103 if (!atomic_inc_not_zero(&orig_node->refcount)) batadv_gw_get_selected_orig() 121 if (new_gw_node && !atomic_inc_not_zero(&new_gw_node->refcount)) batadv_gw_select() 173 if (!atomic_inc_not_zero(&gw_node->refcount)) batadv_gw_get_best_gw_node() 191 atomic_inc(&curr_gw->refcount); batadv_gw_get_best_gw_node() 206 atomic_inc(&curr_gw->refcount); batadv_gw_get_best_gw_node() 426 if (!atomic_inc_not_zero(&orig_node->refcount)) batadv_gw_node_add() 439 atomic_set(&gw_node->refcount, 1); batadv_gw_node_add() 472 if (!atomic_inc_not_zero(&gw_node_tmp->refcount)) batadv_gw_node_get()
|
H A D | multicast.c | 425 * via a translation table lookup. This increases the returned nodes refcount. 440 * increases its refcount. 451 if (!atomic_inc_not_zero(&tmp_orig_node->refcount)) batadv_mcast_forw_ipv4_node_get() 467 * and increases its refcount. 478 if (!atomic_inc_not_zero(&tmp_orig_node->refcount)) batadv_mcast_forw_ipv6_node_get() 496 * increases its refcount. 518 * set and increases its refcount. 529 if (!atomic_inc_not_zero(&tmp_orig_node->refcount)) batadv_mcast_forw_unsnoop_node_get()
|
H A D | originator.h | 111 if (!atomic_inc_not_zero(&orig_node->refcount)) hlist_for_each_entry_rcu()
|
H A D | routing.c | 75 if (curr_router && !atomic_inc_not_zero(&curr_router->refcount)) _batadv_update_route() 102 /* increase refcount of new best neighbor */ _batadv_update_route() 103 if (neigh_node && !atomic_inc_not_zero(&neigh_node->refcount)) _batadv_update_route() 120 /* decrease refcount of previous best neighbor */ _batadv_update_route() 494 if (!atomic_inc_not_zero(&cand->refcount)) batadv_find_router() 501 if (!atomic_inc_not_zero(&cand_router->refcount)) { batadv_find_router() 520 atomic_inc(&cand_router->refcount); batadv_find_router() 521 atomic_inc(&cand->refcount); batadv_find_router()
|
H A D | hard-interface.c | 66 atomic_inc_not_zero(&hard_iface->refcount)) batadv_hardif_get_by_netdev() 171 atomic_inc_not_zero(&hard_iface->refcount)) batadv_hardif_get_active() 205 if (new_hard_iface && !atomic_inc_not_zero(&new_hard_iface->refcount)) batadv_primary_if_select() 432 if (!atomic_inc_not_zero(&hard_iface->refcount)) batadv_hardif_enable_interface() 649 atomic_set(&hard_iface->refcount, 2); batadv_hardif_add_interface()
|
H A D | main.c | 632 if (atomic_dec_and_test(&tvlv_handler->refcount)) batadv_tvlv_handler_free_ref() 659 if (!atomic_inc_not_zero(&tvlv_handler_tmp->refcount)) batadv_tvlv_handler_get() 677 if (atomic_dec_and_test(&tvlv->refcount)) batadv_tvlv_container_free_ref() 705 if (!atomic_inc_not_zero(&tvlv_tmp->refcount)) batadv_tvlv_container_get() 811 atomic_set(&tvlv_new->refcount, 1); batadv_tvlv_container_register() 1097 atomic_set(&tvlv_handler->refcount, 1); batadv_tvlv_handler_register()
|
/linux-4.4.14/drivers/staging/rdma/hfi1/ |
H A D | verbs_mcast.c | 68 atomic_inc(&qp->refcount); mcast_qp_alloc() 79 if (atomic_dec_and_test(&qp->refcount)) mcast_qp_free() 102 atomic_set(&mcast->refcount, 0); mcast_alloc() 148 atomic_inc(&mcast->refcount); hfi1_mcast_find() 230 atomic_inc(&mcast->refcount); mcast_add() 364 wait_event(mcast->wait, atomic_read(&mcast->refcount) <= 1); hfi1_multicast_detach() 368 atomic_dec(&mcast->refcount); hfi1_multicast_detach() 369 wait_event(mcast->wait, !atomic_read(&mcast->refcount)); hfi1_multicast_detach()
|
H A D | keys.c | 199 atomic_inc(&mr->refcount); hfi1_lkey_ok() 220 atomic_inc(&mr->refcount); hfi1_lkey_ok() 296 atomic_inc(&mr->refcount); hfi1_rkey_ok() 317 atomic_inc(&mr->refcount); hfi1_rkey_ok()
|
H A D | mr.c | 82 atomic_set(&mr->refcount, 1); init_mregion() 331 "hfi1_dereg_mr timeout mr %p pd %p refcount %u\n", hfi1_dereg_mr() 332 mr, mr->mr.pd, atomic_read(&mr->mr.refcount)); hfi1_dereg_mr() 443 i = atomic_read(&fmr->mr.refcount); hfi1_map_phys_fmr()
|
H A D | qp.c | 237 atomic_inc(&qp->refcount); insert_qp() 295 if (atomic_dec_and_test(&qp->refcount)) remove_qp() 425 atomic_dec(&to_iah(wqe->ud_wr.ah)->refcount); clear_mr_refs() 482 if (atomic_dec_and_test(&qp->refcount)) hfi1_error_qp() 567 if (atomic_dec_and_test(&qp->refcount)) flush_iowait() 733 wait_event(qp->wait, !atomic_read(&qp->refcount)); hfi1_modify_qp() 1114 atomic_set(&qp->refcount, 0); hfi1_create_qp() 1267 wait_event(qp->wait, !atomic_read(&qp->refcount)); hfi1_destroy_qp() 1396 if (atomic_dec_and_test(&qp->refcount)) hfi1_qp_wakeup() 1436 atomic_inc(&qp->refcount); iowait_sleep() 1649 atomic_read(&qp->refcount), qp_iter_print()
|
H A D | verbs.h | 232 atomic_t refcount; member in struct:hfi1_mcast 246 atomic_t refcount; member in struct:hfi1_ah 320 struct completion comp; /* complete when refcount goes to zero */ 321 atomic_t refcount; member in struct:hfi1_mregion 475 atomic_t refcount ____cacheline_aligned_in_smp; 1041 atomic_inc(&mr->refcount); hfi1_get_mr() 1046 if (unlikely(atomic_dec_and_test(&mr->refcount))) hfi1_put_mr()
|
/linux-4.4.14/drivers/infiniband/hw/qib/ |
H A D | qib_verbs_mcast.c | 51 atomic_inc(&qp->refcount); qib_mcast_qp_alloc() 62 if (atomic_dec_and_test(&qp->refcount)) qib_mcast_qp_free() 85 atomic_set(&mcast->refcount, 0); qib_mcast_alloc() 131 atomic_inc(&mcast->refcount); qib_mcast_find() 213 atomic_inc(&mcast->refcount); qib_mcast_add() 346 wait_event(mcast->wait, atomic_read(&mcast->refcount) <= 1); qib_multicast_detach() 350 atomic_dec(&mcast->refcount); qib_multicast_detach() 351 wait_event(mcast->wait, !atomic_read(&mcast->refcount)); qib_multicast_detach()
|
H A D | qib_keys.c | 175 if (unlikely(!atomic_inc_not_zero(&mr->refcount))) qib_lkey_ok() 197 if (unlikely(!atomic_inc_not_zero(&mr->refcount))) qib_lkey_ok() 274 if (unlikely(!atomic_inc_not_zero(&mr->refcount))) qib_rkey_ok() 296 if (unlikely(!atomic_inc_not_zero(&mr->refcount))) qib_rkey_ok()
|
H A D | qib_verbs.c | 445 atomic_inc(&to_iah(ud_wr(wr)->ah)->refcount); qib_post_one_send() 689 if (atomic_dec_return(&mcast->refcount) <= 1) qib_ib_rcv() 695 &rcd->lookaside_qp->refcount)) qib_ib_rcv() 733 atomic_inc(&qp->refcount); mem_timer() 746 if (atomic_dec_and_test(&qp->refcount)) mem_timer() 1006 if (atomic_dec_and_test(&qp->refcount)) qib_put_txreq() 1029 atomic_inc(&qp->refcount); qib_put_txreq() 1039 if (atomic_dec_and_test(&qp->refcount)) qib_put_txreq() 1072 atomic_inc(&qp->refcount); qib_verbs_sdma_desc_avail() 1086 if (atomic_dec_and_test(&qp->refcount)) qib_verbs_sdma_desc_avail() 1180 atomic_inc(&qp->refcount); qib_verbs_send_dma() 1547 atomic_inc(&qp->refcount); qib_ib_piobufavail() 1565 if (atomic_dec_and_test(&qp->refcount)) qib_ib_piobufavail() 1872 atomic_set(&ah->refcount, 0); qib_create_ah() 1909 if (atomic_read(&ah->refcount) != 0) qib_destroy_ah()
|
H A D | qib_qp.c | 229 atomic_inc(&qp->refcount); insert_qp() 284 atomic_dec(&qp->refcount); remove_qp() 350 atomic_inc(&qp->refcount); qib_lookup_qpn() 358 atomic_inc(&qp->refcount); qib_lookup_qpn() 440 atomic_dec(&to_iah(wqe->ud_wr.ah)->refcount); clear_mr_refs() 715 wait_event(qp->wait, !atomic_read(&qp->refcount)); qib_modify_qp() 1094 atomic_set(&qp->refcount, 0); qib_create_qp() 1230 wait_event(qp->wait, !atomic_read(&qp->refcount)); qib_destroy_qp()
|
H A D | qib_verbs.h | 220 atomic_t refcount; member in struct:qib_mcast 234 atomic_t refcount; member in struct:qib_ah 309 struct completion comp; /* complete when refcount goes to zero */ 311 atomic_t refcount; member in struct:qib_mregion 465 atomic_t refcount ____cacheline_aligned_in_smp; 1067 atomic_inc(&mr->refcount); qib_get_mr() 1074 if (unlikely(atomic_dec_and_test(&mr->refcount))) qib_put_mr()
|
H A D | qib_driver.c | 403 &qp->refcount); qib_rcv_hdrerr() 426 if (atomic_dec_and_test(&qp->refcount)) qib_rcv_hdrerr() 557 if (atomic_dec_and_test(&rcd->lookaside_qp->refcount)) qib_kreceive() 584 if (atomic_dec_and_test(&qp->refcount)) qib_kreceive()
|
/linux-4.4.14/drivers/gpu/drm/i915/ |
H A D | i915_gem_debug.c | 49 !atomic_read(&obj->base.refcount.refcount)) { for_each_ring()
|
/linux-4.4.14/mm/ |
H A D | zpool.c | 41 atomic_set(&driver->refcount, 0); zpool_register_driver() 59 int ret = 0, refcount; zpool_unregister_driver() local 62 refcount = atomic_read(&driver->refcount); zpool_unregister_driver() 63 WARN_ON(refcount < 0); zpool_unregister_driver() 64 if (refcount > 0) zpool_unregister_driver() 85 atomic_inc(&driver->refcount); zpool_get_driver() 97 atomic_dec(&driver->refcount); zpool_put_driver()
|
H A D | zswap.c | 133 * refcount - the number of outstanding reference to the entry. This is needed 137 * be held while changing the refcount. Since the lock must 138 * be held, there is no reason to also make refcount atomic. 147 int refcount; member in struct:zswap_entry 160 * - the refcount field of each entry in the tree 238 entry->refcount = 1; zswap_entry_cache_alloc() 319 entry->refcount++; zswap_entry_get() 328 int refcount = --entry->refcount; zswap_entry_put() local 330 BUG_ON(refcount < 0); zswap_entry_put() 331 if (refcount == 0) { zswap_entry_put() 915 * (1) refcount is 1(normal case), entry is valid and on the tree zswap_writeback_entry() 916 * (2) refcount is 0, entry is freed and not on the tree zswap_writeback_entry()
|
H A D | slab_common.c | 242 if (s->refcount < 0) slab_unmergeable() 346 s->refcount = 1; create_cache() 714 s->refcount--; kmem_cache_destroy() 715 if (s->refcount) kmem_cache_destroy() 781 s->refcount = -1; /* Exempt from merging for now */ create_boot_cache() 794 s->refcount = 1; create_kmalloc_cache()
|
/linux-4.4.14/drivers/net/ethernet/mellanox/mlx5/core/ |
H A D | cq.c | 50 atomic_inc(&cq->refcount); mlx5_cq_completion() 62 if (atomic_dec_and_test(&cq->refcount)) mlx5_cq_completion() 75 atomic_inc(&cq->refcount); mlx5_cq_event() 86 if (atomic_dec_and_test(&cq->refcount)) mlx5_cq_event() 112 atomic_set(&cq->refcount, 1); mlx5_core_create_cq() 172 if (atomic_dec_and_test(&cq->refcount)) mlx5_core_destroy_cq()
|
H A D | srq.c | 51 atomic_inc(&srq->refcount); mlx5_srq_event() 62 if (atomic_dec_and_test(&srq->refcount)) mlx5_srq_event() 143 atomic_inc(&srq->refcount); mlx5_core_get_srq() 456 atomic_set(&srq->refcount, 1); mlx5_core_create_srq() 498 if (atomic_dec_and_test(&srq->refcount)) mlx5_core_destroy_srq()
|
H A D | qp.c | 52 atomic_inc(&common->refcount); mlx5_get_rsc() 66 if (atomic_dec_and_test(&common->refcount)) mlx5_core_put_rsc() 231 atomic_set(&qp->common.refcount, 1); mlx5_core_create_qp()
|
/linux-4.4.14/include/net/ |
H A D | netrom.h | 96 atomic_t refcount; member in struct:nr_neigh 112 atomic_t refcount; member in struct:nr_node 121 atomic_inc(&((__nr_node)->refcount)) 125 if (atomic_dec_and_test(&nr_node->refcount)) { nr_node_put() 131 atomic_inc(&((__nr_neigh)->refcount)) 135 if (atomic_dec_and_test(&nr_neigh->refcount)) { nr_neigh_put()
|
H A D | ax25.h | 161 atomic_t refcount; member in struct:ax25_uid_assoc 170 atomic_inc(&((ax25)->refcount)) 174 if (atomic_dec_and_test(&assoc->refcount)) { ax25_uid_put() 188 atomic_t refcount; member in struct:ax25_route 197 atomic_inc(&ax25_rt->refcount); ax25_hold_route() 204 if (atomic_dec_and_test(&ax25_rt->refcount)) ax25_put_route() 247 atomic_t refcount; member in struct:ax25_cb 269 atomic_inc(&((__ax25)->refcount)) 273 if (atomic_dec_and_test(&ax25->refcount)) { ax25_cb_put()
|
H A D | netlabel.h | 122 * @refcount: atomic reference counter 136 atomic_t refcount; member in struct:netlbl_lsm_cache 238 atomic_set(&cache->refcount, 1); netlbl_secattr_cache_alloc() 252 if (!atomic_dec_and_test(&cache->refcount)) netlbl_secattr_cache_free()
|
/linux-4.4.14/drivers/gpu/drm/amd/amdgpu/ |
H A D | amdgpu_ctx.c | 36 kref_init(&ctx->refcount); amdgpu_ctx_init() 116 ctx = container_of(ref, struct amdgpu_ctx, refcount); amdgpu_ctx_do_release() 132 kref_put(&ctx->refcount, amdgpu_ctx_do_release); amdgpu_ctx_free() 220 kref_get(&ctx->refcount); amdgpu_ctx_get() 230 kref_put(&ctx->refcount, amdgpu_ctx_do_release); amdgpu_ctx_put() 303 if (kref_put(&ctx->refcount, amdgpu_ctx_do_release) != 1) idr_for_each_entry()
|
/linux-4.4.14/drivers/infiniband/core/ |
H A D | multicast.c | 64 atomic_t refcount; member in struct:mcast_port 106 atomic_t refcount; member in struct:mcast_group 121 atomic_t refcount; member in struct:mcast_member 182 if (atomic_dec_and_test(&port->refcount)) deref_port() 192 if (atomic_dec_and_test(&group->refcount)) { release_group() 203 if (atomic_dec_and_test(&member->refcount)) deref_member() 216 atomic_inc(&group->refcount); queue_join() 412 atomic_inc(&member->refcount); process_group_error() 456 atomic_inc(&member->refcount); mcast_work_handler() 508 atomic_inc(&member->refcount); process_join_error() 597 atomic_inc(&port->refcount); acquire_group() 599 atomic_inc(&group->refcount); acquire_group() 640 atomic_set(&member->refcount, 1); ib_sa_join_multicast() 767 atomic_inc(&group->refcount); mcast_groups_event() 828 atomic_set(&port->refcount, 1); mcast_add_one()
|
H A D | mad_priv.h | 106 atomic_t refcount; member in struct:ib_mad_agent_private 115 atomic_t refcount; member in struct:ib_mad_snoop_private 133 int refcount; member in struct:ib_mad_send_wr_private
|
H A D | mad_rmpp.c | 55 atomic_t refcount; member in struct:mad_rmpp_recv 76 if (atomic_dec_and_test(&rmpp_recv->refcount)) deref_rmpp_recv() 307 atomic_set(&rmpp_recv->refcount, 1); create_rmpp_recv() 359 atomic_inc(&rmpp_recv->refcount); acquire_rmpp_recv() 555 atomic_inc(&rmpp_recv->refcount); start_rmpp() 728 if (mad_send_wr->refcount == 1) process_rmpp_ack() 734 } else if (mad_send_wr->refcount == 1 && process_rmpp_ack() 742 mad_send_wr->refcount++; process_rmpp_ack() 901 mad_send_wr->refcount += (mad_send_wr->timeout == 0); ib_send_rmpp_mad()
|
H A D | iwcm.h | 55 atomic_t refcount; member in struct:iwcm_id_private
|
H A D | mad.c | 368 atomic_set(&mad_agent_priv->refcount, 1); ib_register_mad_agent() 535 atomic_set(&mad_snoop_priv->refcount, 1); ib_register_mad_snoop() 547 if (atomic_dec_and_test(&mad_agent_priv->refcount)) deref_mad_agent() 553 if (atomic_dec_and_test(&mad_snoop_priv->refcount)) deref_snoop_agent() 657 atomic_inc(&mad_snoop_priv->refcount); snoop_send() 682 atomic_inc(&mad_snoop_priv->refcount); snoop_recv() 861 atomic_inc(&mad_agent_priv->refcount); handle_outgoing_dr_smp() 901 atomic_inc(&mad_agent_priv->refcount); handle_outgoing_dr_smp() 1060 atomic_inc(&mad_agent_priv->refcount); ib_create_send_mad() 1266 mad_send_wr->refcount = 1 + (mad_send_wr->timeout > 0); ib_post_send_mad() 1270 atomic_inc(&mad_agent_priv->refcount); ib_post_send_mad() 1287 atomic_dec(&mad_agent_priv->refcount); ib_post_send_mad() 1779 atomic_inc(&mad_agent->refcount); find_mad_agent() 1949 if (mad_send_wr->refcount == 1) ib_mark_mad_done() 1988 atomic_dec(&mad_agent_priv->refcount); ib_mad_complete_recv() 2004 atomic_dec(&mad_agent_priv->refcount); ib_mad_complete_recv() 2385 mad_send_wr->refcount -= (mad_send_wr->timeout > 0); ib_mad_complete_send_wr() 2388 if (--mad_send_wr->refcount > 0) { ib_mad_complete_send_wr() 2389 if (mad_send_wr->refcount == 1 && mad_send_wr->timeout && ib_mad_complete_send_wr() 2594 mad_send_wr->refcount -= (mad_send_wr->timeout > 0); cancel_mads() 2612 atomic_dec(&mad_agent_priv->refcount); cancel_mads() 2655 active = (!mad_send_wr->timeout || mad_send_wr->refcount > 1); ib_modify_mad() 2658 mad_send_wr->refcount -= (mad_send_wr->timeout > 0); ib_modify_mad() 2749 atomic_dec(&recv_mad_agent->refcount); local_completions() 2766 atomic_dec(&mad_agent_priv->refcount); local_completions() 2803 mad_send_wr->refcount++; retry_send() 2852 atomic_dec(&mad_agent_priv->refcount); timeout_sends()
|
H A D | addr.c | 93 atomic_set(&client->refcount, 1); rdma_addr_register_client() 100 if (atomic_dec_and_test(&client->refcount)) put_client() 404 atomic_inc(&client->refcount); rdma_resolve_ip() 418 atomic_dec(&client->refcount); rdma_resolve_ip()
|
H A D | iwpm_util.c | 59 if (atomic_read(&iwpm_admin.refcount) == 0) { iwpm_init() 76 atomic_inc(&iwpm_admin.refcount); iwpm_init() 98 if (atomic_read(&iwpm_admin.refcount) == 0) { iwpm_exit() 100 pr_err("%s Incorrect usage - negative refcount\n", __func__); iwpm_exit() 103 if (atomic_dec_and_test(&iwpm_admin.refcount)) { iwpm_exit()
|
H A D | iwcm.c | 179 BUG_ON(atomic_read(&cm_id_priv->refcount)==0); iwcm_deref_id() 180 if (atomic_dec_and_test(&cm_id_priv->refcount)) { iwcm_deref_id() 193 atomic_inc(&cm_id_priv->refcount); add_ref() 234 atomic_set(&cm_id_priv->refcount, 1); iw_create_cm_id() 691 if (atomic_read(&cm_id_priv->refcount)==0) cm_conn_req_handler() 896 BUG_ON(atomic_read(&cm_id_priv->refcount)==0); cm_work_handler() 958 atomic_inc(&cm_id_priv->refcount); cm_event_handler()
|
H A D | uverbs_main.c | 332 if (atomic_dec_and_test(&file->device->refcount)) ib_uverbs_release_file() 887 if (!atomic_inc_not_zero(&dev->refcount)) ib_uverbs_open() 940 if (atomic_dec_and_test(&dev->refcount)) ib_uverbs_open() 1087 atomic_set(&uverbs_dev->refcount, 1); ib_uverbs_add_one() 1152 if (atomic_dec_and_test(&uverbs_dev->refcount)) ib_uverbs_add_one() 1255 if (atomic_dec_and_test(&uverbs_dev->refcount)) ib_uverbs_remove_one()
|
/linux-4.4.14/drivers/scsi/bnx2fc/ |
H A D | bnx2fc_io.c | 36 kref_get(&io_req->refcount); bnx2fc_cmd_timer_set() 77 io_req->refcount.refcount.counter); bnx2fc_cmd_timeout() 85 kref_put(&io_req->refcount, bnx2fc_cmd_release); bnx2fc_cmd_timeout() 106 kref_put(&io_req->refcount, bnx2fc_cmd_release); bnx2fc_cmd_timeout() 123 kref_put(&io_req->refcount, bnx2fc_cmd_release); bnx2fc_cmd_timeout() 157 kref_put(&io_req->refcount, bnx2fc_cmd_release); bnx2fc_cmd_timeout() 447 kref_init(&io_req->refcount); bnx2fc_elstm_alloc() 502 kref_init(&io_req->refcount); bnx2fc_cmd_alloc() 509 struct bnx2fc_cmd, refcount); bnx2fc_cmd_release() 720 kref_put(&io_req->refcount, bnx2fc_cmd_release); bnx2fc_initiate_tmf() 791 kref_put(&io_req->refcount, bnx2fc_cmd_release); bnx2fc_initiate_tmf() 933 kref_get(&orig_io_req->refcount); bnx2fc_initiate_seq_cleanup() 1087 kref_put(&io_req->refcount, bnx2fc_cmd_release); bnx2fc_abts_cleanup() 1133 io_req->refcount.refcount.counter); bnx2fc_eh_abort() 1136 kref_get(&io_req->refcount); bnx2fc_eh_abort() 1149 kref_put(&io_req->refcount, bnx2fc_cmd_release); bnx2fc_eh_abort() 1165 kref_put(&io_req->refcount, bnx2fc_cmd_release); bnx2fc_eh_abort() 1188 kref_put(&io_req->refcount, bnx2fc_eh_abort() 1202 kref_put(&io_req->refcount, bnx2fc_eh_abort() 1240 kref_put(&io_req->refcount, bnx2fc_cmd_release); bnx2fc_eh_abort() 1244 kref_put(&io_req->refcount, bnx2fc_cmd_release); bnx2fc_eh_abort() 1279 kref_put(&orig_io_req->refcount, bnx2fc_cmd_release); bnx2fc_process_seq_cleanup_compl() 1291 io_req->refcount.refcount.counter, io_req->cmd_type); bnx2fc_process_cleanup_compl() 1293 kref_put(&io_req->refcount, bnx2fc_cmd_release); bnx2fc_process_cleanup_compl() 1310 io_req->refcount.refcount.counter, io_req->cmd_type); bnx2fc_process_abts_compl() 1332 kref_put(&io_req->refcount, bnx2fc_process_abts_compl() 1384 kref_put(&io_req->refcount, bnx2fc_cmd_release); bnx2fc_process_abts_compl() 1412 kref_put(&io_req->refcount, bnx2fc_lun_reset_cmpl() 1445 kref_put(&io_req->refcount, bnx2fc_tgt_reset_cmpl() 1549 kref_put(&io_req->refcount, bnx2fc_cmd_release); bnx2fc_process_tm_compl() 1865 kref_put(&io_req->refcount, bnx2fc_process_scsi_cmd_compl() 1938 kref_put(&io_req->refcount, bnx2fc_cmd_release); bnx2fc_process_scsi_cmd_compl() 1984 kref_put(&io_req->refcount, bnx2fc_cmd_release); bnx2fc_post_io_req() 1998 kref_put(&io_req->refcount, bnx2fc_cmd_release); bnx2fc_post_io_req() 2004 kref_put(&io_req->refcount, bnx2fc_cmd_release); bnx2fc_post_io_req()
|
H A D | bnx2fc_els.c | 40 kref_put(&orig_io_req->refcount, bnx2fc_cmd_release); bnx2fc_rrq_compl() 108 kref_put(&aborted_io_req->refcount, bnx2fc_cmd_release); bnx2fc_send_rrq() 364 kref_put(&orig_io_req->refcount, bnx2fc_cmd_release); bnx2fc_srr_compl() 570 kref_put(&orig_io_req->refcount, bnx2fc_cmd_release); bnx2fc_rec_compl() 593 kref_get(&orig_io_req->refcount); bnx2fc_send_rec() 609 kref_put(&orig_io_req->refcount, bnx2fc_cmd_release); bnx2fc_send_rec() 634 kref_get(&orig_io_req->refcount); bnx2fc_send_srr() 653 kref_put(&orig_io_req->refcount, bnx2fc_cmd_release); bnx2fc_send_srr() 716 kref_put(&els_req->refcount, bnx2fc_cmd_release); bnx2fc_initiate_els() 737 kref_put(&els_req->refcount, bnx2fc_cmd_release); bnx2fc_initiate_els() 777 kref_put(&els_req->refcount, bnx2fc_cmd_release); bnx2fc_initiate_els() 813 kref_put(&els_req->refcount, bnx2fc_cmd_release); bnx2fc_process_els_compl() 819 kref_put(&els_req->refcount, bnx2fc_process_els_compl() 846 kref_put(&els_req->refcount, bnx2fc_cmd_release); bnx2fc_process_els_compl()
|
/linux-4.4.14/drivers/gpu/drm/ttm/ |
H A D | ttm_object.c | 74 struct kref refcount; member in struct:ttm_object_file 135 kref_get(&tfile->refcount); ttm_object_file_ref() 142 container_of(kref, struct ttm_object_file, refcount); ttm_object_file_destroy() 153 kref_put(&tfile->refcount, ttm_object_file_destroy); ttm_object_file_unref() 173 kref_init(&base->refcount); ttm_base_object_init() 201 container_of(kref, struct ttm_base_object, refcount); ttm_release_base() 225 kref_put(&base->refcount, ttm_release_base); ttm_base_object_unref() 242 if (!kref_get_unless_zero(&base->refcount)) ttm_base_object_lookup() 264 if (!kref_get_unless_zero(&base->refcount)) ttm_base_object_lookup_for_ref() 307 if (unlikely(atomic_read(&ref->kref.refcount) == 0)) ttm_ref_object_exists() 369 kref_get(&base->refcount); ttm_ref_object_add() 473 kref_init(&tfile->refcount); ttm_object_file_init() 545 * Obtain a file reference from a lookup structure that doesn't refcount 559 * ttm_prime_refcount_release - refcount release method for a prime object.
|
/linux-4.4.14/drivers/of/ |
H A D | of_mdio.c | 201 * struct device refcount incremented by one, or NULL on failure. 222 * struct device refcount incremented by one, or NULL on failure. The 223 * refcount must be dropped by calling phy_disconnect() or phy_detach(). 240 /* refcount is held by phy_connect_direct() on success */ of_phy_connect() 255 * struct device refcount incremented by one, or NULL on failure. The 256 * refcount must be dropped by calling phy_disconnect() or phy_detach(). 270 /* refcount is held by phy_attach_direct() on success */ of_phy_attach()
|
H A D | dynamic.c | 18 * of_node_get() - Increment refcount of a node 19 * @node: Node to inc refcount, NULL is supported to simplify writing of 33 * of_node_put() - Decrement refcount of a node 34 * @node: Node to dec refcount, NULL is supported to simplify writing of 291 * the node is not freed until its refcount goes to zero.
|
H A D | base.c | 269 * Returns a node pointer with refcount incremented, use 592 * Returns a node pointer with refcount incremented, use 615 * refcount on the passed node, making it suitable for iterating 618 * Returns a node pointer with refcount incremented, use 661 * Returns a node pointer with refcount incremented, use of_node_put() on 663 * refcount of prev. 716 * Returns a node pointer if found, with refcount incremented, use 768 * Returns a node pointer with refcount incremented, use 832 * Returns a node pointer with refcount incremented, use 861 * Returns a node pointer with refcount incremented, use 892 * Returns a node pointer with refcount incremented, use 921 * Returns a node pointer with refcount incremented, use 999 * Returns a node pointer with refcount incremented, use 1059 * Returns a node pointer with refcount incremented, use 1565 * Returns the device_node pointer with refcount incremented. Use 2072 * Returns a node pointer with refcount incremented, use 2135 * Return: A 'port' node pointer with refcount incremented. The caller 2167 * Return: An 'endpoint' node pointer with refcount incremented. Refcount
|
/linux-4.4.14/drivers/tty/vt/ |
H A D | consolemap.c | 178 unsigned long refcount; member in struct:uni_pagedir 428 if (--p->refcount) con_free_unimap() 464 q->refcount++; con_unify_unimap() 509 if (!p || --p->refcount) { con_do_clear_unimap() 513 p->refcount++; con_do_clear_unimap() 516 q->refcount=1; con_do_clear_unimap() 520 p->refcount++; con_do_clear_unimap() 555 if (p->refcount > 1) { con_set_unimap() 566 * Since refcount was > 1, con_clear_unimap() allocated a con_set_unimap() 592 p->refcount++; con_set_unimap() 669 dflt->refcount++; con_set_default_unimap() 671 if (p && !--p->refcount) { con_set_default_unimap() 724 q->refcount++; con_copy_unimap()
|
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/ |
H A D | base.c | 233 if (--vpgt->refcount[big]) nvkm_vm_unmap_pgt() 269 vpgt->refcount[big]++; nvkm_vm_map_pgt() 298 if (likely(vpgt->refcount[big])) { nvkm_vm_get() 299 vpgt->refcount[big]++; nvkm_vm_get() 354 vm->pgt[0].refcount[0] = 1; nvkm_vm_boot() 378 kref_init(&vm->refcount); nvkm_vm_create() 457 struct nvkm_vm *vm = container_of(kref, typeof(*vm), refcount); nvkm_vm_del() 477 kref_get(&ref->refcount); nvkm_vm_ref() 482 kref_put(&(*ptr)->refcount, nvkm_vm_del); nvkm_vm_ref()
|
H A D | nv04.c | 92 mmu->vm->pgt[0].refcount[0] = 1; nv04_mmu_oneinit()
|
H A D | nv41.c | 103 mmu->vm->pgt[0].refcount[0] = 1; nv41_mmu_oneinit()
|
/linux-4.4.14/security/apparmor/include/ |
H A D | policy.h | 161 * @base - base components of the profile (name, refcount, lists, lock ...) 267 * aa_get_profile - increment refcount on profile @p 271 * Requires: @p must be held with valid refcount when called 282 * aa_get_profile_not0 - increment refcount on profile @p found via lookup 286 * Requires: @p must be held with valid refcount when called 297 * aa_get_profile_rcu - increment a refcount profile that can be replaced 336 * aa_put_profile - decrement refcount on profile @p 376 * Requires: @ns must be held with valid refcount when called 387 * aa_put_namespace - decrement refcount on @ns
|
H A D | match.h | 130 * aa_put_dfa - put a dfa refcount 131 * @dfa: dfa to put refcount (MAYBE NULL) 133 * Requires: if @dfa != NULL that a valid refcount be held
|
H A D | apparmor.h | 83 return atomic_inc_not_zero(&kref->refcount); kref_get_not0()
|
/linux-4.4.14/fs/squashfs/ |
H A D | cache.c | 103 if (cache->entry[i].refcount == 0) squashfs_cache_get() 117 entry->refcount = 1; squashfs_cache_get() 148 * Block already in cache. Increment refcount so it doesn't squashfs_cache_get() 154 if (entry->refcount == 0) squashfs_cache_get() 156 entry->refcount++; squashfs_cache_get() 173 TRACE("Got %s %d, start block %lld, refcount %d, error %d\n", squashfs_cache_get() 174 cache->name, i, entry->block, entry->refcount, entry->error); squashfs_cache_get() 191 entry->refcount--; squashfs_cache_put() 192 if (entry->refcount == 0) { squashfs_cache_put()
|
H A D | squashfs_fs_sb.h | 45 int refcount; member in struct:squashfs_cache_entry
|
/linux-4.4.14/drivers/infiniband/hw/mlx4/ |
H A D | mcg.c | 119 /* refcount is the reference count for the following: 124 atomic_t refcount; member in struct:mcast_group 444 if (atomic_dec_and_test(&group->refcount)) { release_group() 448 atomic_inc(&group->refcount); release_group() 577 atomic_inc(&group->refcount); mlx4_ib_mcg_timeout_handler() 579 safe_atomic_dec(&group->refcount); mlx4_ib_mcg_timeout_handler() 781 atomic_inc(&group->refcount); search_relocate_mgid0_group() 869 atomic_inc(&group->refcount); acquire_group() 877 atomic_inc(&group->refcount); /* for the request */ queue_req() 878 atomic_inc(&group->refcount); /* for scheduling the work */ queue_req() 883 safe_atomic_dec(&group->refcount); queue_req() 917 atomic_inc(&group->refcount); mlx4_ib_mcg_demux_handler() 919 safe_atomic_dec(&group->refcount); mlx4_ib_mcg_demux_handler() 1020 atomic_read(&group->refcount), sysfs_show_group() 1107 if (atomic_read(&group->refcount)) _mlx4_ib_mcg_port_cleanup() 1108 mcg_warn_group(group, "group refcount %d!!! (pointer %p)\n", atomic_read(&group->refcount), group); _mlx4_ib_mcg_port_cleanup() 1189 atomic_dec(&group->refcount); clear_pending_reqs() 1239 if (atomic_read(&group->refcount)) { clean_vf_mcast()
|
/linux-4.4.14/drivers/infiniband/hw/cxgb3/ |
H A D | iwch_cm.h | 58 ep, atomic_read(&((ep)->kref.refcount))); \ 59 WARN_ON(atomic_read(&((ep)->kref.refcount)) < 1); \ 65 ep, atomic_read(&((ep)->kref.refcount))); \
|
/linux-4.4.14/drivers/infiniband/hw/mthca/ |
H A D | mthca_memfree.c | 60 int refcount; member in struct:mthca_user_db_table::__anon5275 152 icm->refcount = 0; mthca_alloc_icm() 230 ++table->icm[i]->refcount; mthca_table_get() 250 ++table->icm[i]->refcount; mthca_table_get() 268 if (--table->icm[i]->refcount == 0) { mthca_table_put() 406 ++table->icm[i]->refcount; mthca_alloc_icm_table() 463 if ((db_tab->page[i].refcount >= MTHCA_DB_REC_PER_PAGE) || mthca_map_user_db() 470 if (db_tab->page[i].refcount) { mthca_map_user_db() 471 ++db_tab->page[i].refcount; mthca_map_user_db() 498 db_tab->page[i].refcount = 1; mthca_map_user_db() 518 --db_tab->page[index / MTHCA_DB_REC_PER_PAGE].refcount; mthca_unmap_user_db() 539 db_tab->page[i].refcount = 0; mthca_init_user_db_tab()
|
H A D | mthca_provider.h | 204 int refcount; member in struct:mthca_cq 225 int refcount; member in struct:mthca_srq 263 int refcount; member in struct:mthca_qp
|
H A D | mthca_srq.c | 259 srq->refcount = 1; mthca_alloc_srq() 324 c = srq->refcount; get_srq_refcount() 348 --srq->refcount; mthca_free_srq() 431 ++srq->refcount; mthca_srq_event() 449 if (!--srq->refcount) mthca_srq_event()
|
H A D | mthca_memfree.h | 60 int refcount; member in struct:mthca_icm
|
/linux-4.4.14/kernel/ |
H A D | cpu.c | 71 atomic_t refcount; member in struct:__anon14782 100 atomic_inc(&cpu_hotplug.refcount); get_online_cpus() 107 int refcount; put_online_cpus() local 112 refcount = atomic_dec_return(&cpu_hotplug.refcount); put_online_cpus() 113 if (WARN_ON(refcount < 0)) /* try to fix things up */ put_online_cpus() 114 atomic_inc(&cpu_hotplug.refcount); put_online_cpus() 116 if (refcount <= 0 && waitqueue_active(&cpu_hotplug.wq)) put_online_cpus() 126 * refcount goes to zero. 138 * - A new reader arrives at this moment, bumps up the refcount. 139 * - The writer acquires the cpu_hotplug.lock finds the refcount 156 if (likely(!atomic_read(&cpu_hotplug.refcount))) cpu_hotplug_begin()
|
H A D | utsname.c | 31 * Clone a new ns copying an original utsname, setting refcount to 1
|
/linux-4.4.14/drivers/net/ethernet/mellanox/mlx4/ |
H A D | cq.c | 72 if (atomic_dec_and_test(&mcq->refcount)) mlx4_cq_tasklet_cb() 94 atomic_inc(&cq->refcount); mlx4_add_cq_to_tasklet() 125 atomic_inc(&cq->refcount); mlx4_cq_event() 136 if (atomic_dec_and_test(&cq->refcount)) mlx4_cq_event() 338 atomic_set(&cq->refcount, 1); mlx4_cq_alloc() 380 if (atomic_dec_and_test(&cq->refcount)) mlx4_cq_free()
|
H A D | srq.c | 52 atomic_inc(&srq->refcount); mlx4_srq_event() 63 if (atomic_dec_and_test(&srq->refcount)) mlx4_srq_event() 209 atomic_set(&srq->refcount, 1); mlx4_srq_alloc() 238 if (atomic_dec_and_test(&srq->refcount)) mlx4_srq_free()
|
H A D | icm.c | 148 icm->refcount = 0; mlx4_alloc_icm() 259 ++table->icm[i]->refcount; mlx4_table_get() 279 ++table->icm[i]->refcount; mlx4_table_get() 295 if (--table->icm[i]->refcount == 0) { mlx4_table_put() 432 ++table->icm[i]->refcount; mlx4_init_icm_table()
|
H A D | icm.h | 59 int refcount; member in struct:mlx4_icm
|
H A D | qp.c | 58 atomic_inc(&qp->refcount); mlx4_qp_event() 69 if (atomic_dec_and_test(&qp->refcount)) mlx4_qp_event() 403 atomic_set(&qp->refcount, 1); mlx4_qp_alloc() 497 if (atomic_dec_and_test(&qp->refcount)) mlx4_qp_free()
|
/linux-4.4.14/drivers/block/zram/ |
H A D | zram_drv.h | 108 atomic_t refcount; /* refcount for zram_meta */ member in struct:zram
|
/linux-4.4.14/drivers/gpu/drm/nouveau/include/nvkm/engine/ |
H A D | fifo.h | 10 int refcount; member in struct:nvkm_fifo_engn
|
/linux-4.4.14/lib/ |
H A D | cpu_rmap.c | 46 kref_init(&rmap->refcount); alloc_cpu_rmap() 71 struct cpu_rmap *rmap = container_of(ref, struct cpu_rmap, refcount); cpu_rmap_release() 81 kref_get(&rmap->refcount); cpu_rmap_get() 90 return kref_put(&rmap->refcount, cpu_rmap_release); cpu_rmap_put()
|
H A D | percpu-refcount.c | 6 #include <linux/percpu-refcount.h> 9 * Initially, a percpu refcount is just a set of percpu counters. Initially, we 24 * What we do is require the user to keep track of the initial refcount; we know 45 * percpu_ref_init - initialize a percpu refcount 47 * @release: function which will be called when refcount hits 0 52 * refcount of 1; analagous to atomic_long_set(ref, 1). See the 312 * percpu_ref_reinit - re-initialize a percpu refcount
|
H A D | Makefile | 29 percpu-refcount.o percpu_ida.o rhashtable.o reciprocal_div.o \
|
H A D | klist.c | 236 * klist_remove - Decrement the refcount of node and wait for it to go away. 309 * refcount of the current node. Necessary in case iteration exited before
|
/linux-4.4.14/net/8021q/ |
H A D | vlan_core.c | 158 int refcount; member in struct:vlan_vid_info 248 vid_info->refcount++; vlan_vid_add() 300 vid_info->refcount--; vlan_vid_del() 301 if (vid_info->refcount == 0) { vlan_vid_del()
|
/linux-4.4.14/include/drm/ |
H A D | drm_gem.h | 43 struct kref refcount; member in struct:drm_gem_object 139 kref_get(&obj->refcount); drm_gem_object_reference() 148 kref_put(&obj->refcount, drm_gem_object_free); drm_gem_object_unreference() 161 if (kref_put_mutex(&obj->refcount, drm_gem_object_free, &dev->struct_mutex)) drm_gem_object_unreference_unlocked()
|
/linux-4.4.14/net/irda/ircomm/ |
H A D | ircomm_lmp.c | 55 /* Don't forget to refcount it - should be NULL anyway */ ircomm_lmp_connect_request() 91 /* Don't forget to refcount it - should be NULL anyway */ ircomm_lmp_connect_response() 115 /* Don't forget to refcount it - should be NULL anyway */ ircomm_lmp_disconnect_request() 184 /* Don't forget to refcount it - see ircomm_tty_do_softint() */ ircomm_lmp_data_request()
|
H A D | ircomm_ttp.c | 120 /* Don't forget to refcount it - should be NULL anyway */ ircomm_ttp_connect_request() 142 /* Don't forget to refcount it - should be NULL anyway */ ircomm_ttp_connect_response() 176 /* Don't forget to refcount it - see ircomm_tty_do_softint() */ ircomm_ttp_data_request() 298 /* Don't forget to refcount it - should be NULL anyway */ ircomm_ttp_disconnect_request()
|
/linux-4.4.14/drivers/staging/rdma/amso1100/ |
H A D | c2_cq.c | 57 atomic_inc(&cq->refcount); c2_cq_get() 64 if (atomic_dec_and_test(&cq->refcount)) c2_cq_put() 365 atomic_set(&cq->refcount, 1); c2_init_cq() 401 atomic_dec(&cq->refcount); c2_free_cq() 404 wait_event(cq->wait, !atomic_read(&cq->refcount)); c2_free_cq()
|
H A D | c2_provider.h | 94 atomic_t refcount; member in struct:c2_cq 111 atomic_t refcount; member in struct:c2_qp
|
H A D | c2_provider.c | 210 atomic_inc(&qp->refcount); c2_add_ref() 218 if (atomic_dec_and_test(&qp->refcount)) c2_rem_ref() 228 pr_debug("%s Returning QP=%p for QPN=%d, device=%p, refcount=%d\n", c2_get_qp() 230 (qp?atomic_read(&qp->refcount):0)); c2_get_qp()
|
/linux-4.4.14/drivers/pci/ |
H A D | slot.c | 223 * pci_create_slot - create or increment refcount for physical PCI slot 232 * already exists, its refcount will be incremented. 338 * pci_destroy_slot - decrement refcount for physical PCI slot 347 dev_dbg(&slot->bus->dev, "dev %02x, dec refcount to %d\n", pci_destroy_slot() 348 slot->number, atomic_read(&slot->kobj.kref.refcount) - 1); pci_destroy_slot()
|
/linux-4.4.14/block/ |
H A D | blk-ioc.c | 26 BUG_ON(atomic_long_read(&ioc->refcount) <= 0); get_io_context() 27 atomic_long_inc(&ioc->refcount); get_io_context() 137 BUG_ON(atomic_long_read(&ioc->refcount) <= 0); put_io_context() 143 if (atomic_long_dec_and_test(&ioc->refcount)) { put_io_context() 245 atomic_long_set(&ioc->refcount, 1); create_task_io_context()
|
/linux-4.4.14/include/drm/ttm/ |
H A D | ttm_object.h | 52 * TTM_REF_USAGE is a simple refcount on a base object. 104 * @refcount: Number of references to this object, not 131 struct kref refcount; member in struct:ttm_base_object 217 * Decrements the base object refcount and clears the pointer pointed to by 231 * already existed, and the refcount was upped on that object instead.
|
H A D | ttm_bo_api.h | 88 * @io_reserved_vm: The VM system has a refcount in @io_reserved_count 159 * @kref: Reference count of this buffer object. When this refcount reaches 163 * Lru lists may keep one refcount, the delayed delete list, and kref != 0 164 * keeps one refcount. When this refcount reaches zero, 355 * @never_free: The refcount should not reach zero with this operation.
|
/linux-4.4.14/net/core/ |
H A D | dev_addr_lists.c | 39 ha->refcount = 1; __hw_addr_create_ex() 75 ha->refcount++; __hw_addr_add_ex() 108 if (--ha->refcount) __hw_addr_del_entry() 150 ha->refcount++; __hw_addr_sync_one() 180 if (ha->sync_cnt == ha->refcount) { __hw_addr_sync_multiple() 208 } else if (ha->refcount == 1) __hw_addr_sync() 252 if (!ha->sync_cnt || ha->refcount != 1) __hw_addr_sync_dev() 273 ha->refcount++; __hw_addr_sync_dev() 437 ha->type == addr_type && ha->refcount == 1) dev_addr_del()
|
/linux-4.4.14/drivers/dma-buf/ |
H A D | fence.c | 175 container_of(kref, struct fence, refcount); fence_release() 235 * refcount as it does to fence_wait, however the caller doesn't need to 236 * keep a refcount to fence afterwards: when software access is enabled, 507 * refcount after committing with this fence, but it will need to hold a 508 * refcount again if fence_ops.enable_signaling gets called. This can 522 kref_init(&fence->refcount); fence_init()
|
/linux-4.4.14/fs/overlayfs/ |
H A D | readdir.c | 32 long refcount; member in struct:ovl_dir_cache 177 WARN_ON(cache->refcount <= 0); ovl_cache_put() 178 cache->refcount--; ovl_cache_put() 179 if (!cache->refcount) { ovl_cache_put() 338 cache->refcount++; ovl_cache_get() 347 cache->refcount = 1; ovl_cache_get()
|
/linux-4.4.14/net/rds/ |
H A D | ib.c | 117 BUG_ON(atomic_read(&rds_ibdev->refcount) <= 0); rds_ib_dev_put() 118 if (atomic_dec_and_test(&rds_ibdev->refcount)) rds_ib_dev_put() 146 atomic_set(&rds_ibdev->refcount, 1); rds_ib_add_one() 196 atomic_inc(&rds_ibdev->refcount); rds_ib_add_one() 199 atomic_inc(&rds_ibdev->refcount); rds_ib_add_one() 232 atomic_inc(&rds_ibdev->refcount); rds_ib_get_client_data()
|
/linux-4.4.14/drivers/staging/lustre/lustre/libcfs/ |
H A D | libcfs_lock.c | 148 /** free cpu-partition refcount */ 156 /** allocate cpu-partition refcount with initial value @init_val */
|
H A D | hash.c | 92 * - support two different refcount modes 93 * . hash table has refcount on element 94 * . hash table doesn't change refcount on adding/removing element 580 /* use cfs_hash_bd_hnode_add/del, to avoid atomic & refcount ops cfs_hash_bd_move_locked() 610 /** return item w/o refcount */ 612 /** return item with refcount */ 615 /** return item w/o refcount if existed, otherwise add */ 618 /** return item with refcount if existed, otherwise add */ 637 /* with this function, we can avoid a lot of useless refcount ops, cfs_hash_bd_lookup_intent() 653 /* caller wants refcount? */ hlist_for_each()
|
/linux-4.4.14/fs/configfs/ |
H A D | item.c | 165 * config_item_put - decrement refcount for item. 168 * Decrement the refcount, and if 0, call config_item_cleanup().
|
/linux-4.4.14/fs/exofs/ |
H A D | sys.c | 125 (int)atomic_read(&k_name->kref.refcount)); exofs_sysfs_dbg_print() 131 * At the end of it, exofs_kset kobject will have a refcount
|
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/engine/device/ |
H A D | user.c | 220 if (!--device->refcount) { nvkm_udevice_fini() 223 device->refcount++; nvkm_udevice_fini() 241 if (!device->refcount++) { nvkm_udevice_init() 244 device->refcount--; nvkm_udevice_init()
|
/linux-4.4.14/drivers/staging/lustre/lustre/ptlrpc/ |
H A D | connection.c | 83 CDEBUG(D_INFO, "conn=%p refcount %d to %s\n", ptlrpc_connection_get() 118 CDEBUG(D_INFO, "PUT conn=%p refcount %d to %s\n", ptlrpc_connection_put() 130 CDEBUG(D_INFO, "conn=%p refcount %d to %s\n", ptlrpc_connection_addref()
|
H A D | sec_lproc.c | 97 seq_printf(seq, "refcount: %d\n", sptlrpc_info_lprocfs_seq_show()
|
/linux-4.4.14/drivers/infiniband/hw/usnic/ |
H A D | usnic_ib_sysfs.c | 98 if (atomic_read(&us_ibdev->vf_cnt.refcount) > 0) { usnic_ib_show_config() 117 atomic_read(&us_ibdev->vf_cnt.refcount)); usnic_ib_show_config() 165 atomic_read(&us_ibdev->vf_cnt.refcount)); usnic_ib_show_max_vf()
|
/linux-4.4.14/arch/xtensa/mm/ |
H A D | tlb.c | 211 * marked as non-present. Non-present PTE and the page with non-zero refcount 212 * and zero mapcount is normal for batched TLB flush operation. Zero refcount 243 pr_err("page refcount: %d, mapcount: %d\n", check_tlb_entry()
|
/linux-4.4.14/drivers/usb/phy/ |
H A D | phy.c | 137 * Returns the phy driver, after getting a refcount to it; or 176 * after getting a refcount to it, -ENODEV if there is no such phy or 236 * after getting a refcount to it, -ENODEV if there is no such phy or 272 * Returns the phy driver, after getting a refcount to it; or 356 * Releases a refcount the caller received from usb_get_phy().
|
/linux-4.4.14/drivers/uwb/ |
H A D | lc-rc.c | 334 * We assume that this is being called with a > 0 refcount on 455 * Given a radio controller descriptor, validate and refcount it 476 * RC get for external refcount acquirers... 478 * Increments the refcount of the device and it's backend modules 501 * Locate and refcount a radio controller given a common grand-parent
|
/linux-4.4.14/drivers/crypto/qat/qat_common/ |
H A D | adf_dev_mgr.c | 410 * Increment the accel_dev refcount and if this is the first time 412 * increment the module refcount too. 415 * Return: 0 when successful, EFAULT when fail to bump module refcount 430 * Decrement the accel_dev refcount and if this is the last time 432 * decrement the module refcount too.
|
/linux-4.4.14/drivers/staging/comedi/ |
H A D | comedi_buf.c | 34 container_of(kref, struct comedi_buf_map, refcount); comedi_buf_map_kref_release() 102 kref_init(&bm->refcount); __comedi_buf_alloc() 154 kref_get(&bm->refcount); comedi_buf_map_get() 160 return kref_put(&bm->refcount, comedi_buf_map_kref_release); comedi_buf_map_put() 164 /* returns s->async->buf_map and increments its kref refcount */ 191 return bm && (atomic_read(&bm->refcount.refcount) > 1); comedi_buf_is_mmapped()
|
/linux-4.4.14/net/ipv4/netfilter/ |
H A D | ipt_CLUSTERIP.c | 43 atomic_t refcount; /* reference count */ member in struct:clusterip_config 80 atomic_inc(&c->refcount); clusterip_config_get() 92 if (atomic_dec_and_test(&c->refcount)) clusterip_config_put() 115 * functions are also incrementing the refcount on their own, clusterip_config_entry_put() 147 if (unlikely(!atomic_inc_not_zero(&c->refcount))) clusterip_config_find_get() 185 atomic_set(&c->refcount, 1); clusterip_config_init() 309 /* don't need to clusterip_config_get() here, since refcount clusterip_tg()
|
/linux-4.4.14/security/apparmor/ |
H A D | policy.c | 298 /* ns and ns->unconfined share ns->unconfined refcount */ alloc_namespace() 355 * refcount released by caller 421 * refcount @profile, should be put by __list_remove_profile 441 * put @profile list refcount 644 * Returns: refcount profile or NULL on failure 664 /* refcount released by caller */ aa_alloc_profile() 718 /* refcount released by caller */ aa_new_null_profile() 772 /* refcount released by caller */ aa_find_child() 866 /* refcount released by caller */ aa_lookup_profile() 970 * Will duplicate and refcount elements that @new inherits from @old 973 * refcount @new for list, put @old list refcount 999 /* list refcount transferred to @new */ __replace_profile()
|
/linux-4.4.14/drivers/char/agp/ |
H A D | i460-agp.c | 78 int refcount; /* number of kernel pages using the large page */ member in struct:__anon3690::lp_desc 361 * i460.lp_desc[pg_num].refcount tracks the number of kernel pages in use within GART page 386 lp->refcount = 0; i460_alloc_large_page() 455 ++lp->refcount; i460_insert_memory_large_io_page() 484 --lp->refcount; i460_remove_memory_large_io_page() 488 if (lp->refcount == 0) { i460_remove_memory_large_io_page()
|
/linux-4.4.14/fs/f2fs/ |
H A D | extent_cache.c | 71 atomic_set(&et->refcount, 0); __grab_extent_tree() 75 atomic_inc(&et->refcount); __grab_extent_tree() 574 if (!atomic_read(&et->refcount)) { f2fs_shrink_extent_tree() 660 atomic_dec(&et->refcount); f2fs_destroy_extent_tree() 669 atomic_dec(&et->refcount); f2fs_destroy_extent_tree() 670 f2fs_bug_on(sbi, atomic_read(&et->refcount) || et->count); f2fs_destroy_extent_tree()
|
/linux-4.4.14/include/linux/sunrpc/ |
H A D | cache.h | 40 * We only expire entries when refcount is zero. 41 * Existence in the cache is counted the refcount. 203 if (atomic_read(&h->ref.refcount) <= 2 && cache_put()
|
/linux-4.4.14/drivers/staging/lustre/include/linux/libcfs/ |
H A D | libcfs_hash.h | 143 /** hash-table doesn't have refcount on item */ 174 * . two refcount modes 175 * hash-table with & without refcount 253 /** refcount on this hash table */ 315 /** get refcount of item, always called with holding bucket-lock */ 317 /** release refcount of item */ 319 /** release refcount of item, always called with holding bucket-lock */ 380 /* hash-table doesn't keep refcount on item, cfs_hash_with_no_itemref() 382 * ZERO refcount */ cfs_hash_with_no_itemref()
|
/linux-4.4.14/drivers/net/irda/ |
H A D | sir_dongle.c | 129 module_put(drv->owner);/* decrement driver's module refcount */ sirdev_put_dongle()
|
/linux-4.4.14/fs/ext4/ |
H A D | xattr.h | 34 /* id = inum if refcount=1, blknum otherwise */
|
/linux-4.4.14/net/sunrpc/ |
H A D | svcauth.c | 130 if (atomic_dec_and_lock(&dom->ref.refcount, &auth_domain_lock)) { auth_domain_put()
|
/linux-4.4.14/fs/9p/ |
H A D | vfs_dentry.c | 46 * v9fs_cached_dentry_delete - called when dentry refcount equals 0
|
/linux-4.4.14/net/wireless/ |
H A D | scan.c | 45 * pointer is get/put, the refcount update is also propagated to 90 bss->refcount++; bss_ref_get() 95 bss->refcount++; bss_ref_get() 109 hbss->refcount--; bss_ref_put() 110 if (hbss->refcount == 0) bss_ref_put() 113 bss->refcount--; bss_ref_put() 114 if (bss->refcount == 0) bss_ref_put() 736 new->refcount += bss->refcount; cfg80211_combine_bsses() 864 new->refcount = 1; cfg80211_bss_update() 876 hidden->refcount++; cfg80211_bss_update()
|
/linux-4.4.14/drivers/rpmsg/ |
H A D | virtio_rpmsg_bus.c | 197 * This function deallocates an ept, and is invoked when its @kref refcount 205 refcount); __ept_release() 228 kref_init(&ept->refcount); __rpmsg_create_ept() 260 kref_put(&ept->refcount, __ept_release); __rpmsg_create_ept() 334 kref_put(&ept->refcount, __ept_release); __rpmsg_destroy_ept() 508 /* decrement the matched device's refcount back */ rpmsg_create_channel() 811 kref_get(&ept->refcount); rpmsg_recv_single() 826 kref_put(&ept->refcount, __ept_release); rpmsg_recv_single()
|
/linux-4.4.14/drivers/s390/scsi/ |
H A D | zfcp_fc.h | 174 * @refcount: Reference count to keep port open as long as it is in use 184 atomic_t refcount; member in struct:zfcp_fc_wka_port
|
/linux-4.4.14/drivers/vhost/ |
H A D | net.c | 74 /* refcount follows semantics similar to kref: 79 atomic_t refcount; member in struct:vhost_net_ubuf_ref 131 atomic_set(&ubufs->refcount, 1); vhost_net_ubuf_alloc() 139 int r = atomic_sub_return(1, &ubufs->refcount); vhost_net_ubuf_put() 148 wait_event(ubufs->wait, !atomic_read(&ubufs->refcount)); vhost_net_ubuf_put_and_wait() 279 * in this case, the refcount after decrement will eventually reach 1. vhost_zerocopy_callback() 385 atomic_inc(&ubufs->refcount); handle_tx() 781 atomic_set(&n->vqs[VHOST_NET_VQ_TX].ubufs->refcount, 1); vhost_net_flush()
|
/linux-4.4.14/drivers/gpu/drm/msm/ |
H A D | msm_fb.c | 80 fb->refcount.refcount.counter, fb->base.id); msm_framebuffer_describe()
|
/linux-4.4.14/fs/ext2/ |
H A D | xattr.c | 176 ea_bdebug(bh, "b_count=%d, refcount=%d", ext2_xattr_get() 265 ea_bdebug(bh, "b_count=%d, refcount=%d", ext2_xattr_list() 397 ea_bdebug(bh, "b_count=%d, refcount=%d", ext2_xattr_set() 644 ea_bdebug(new_bh, "refcount now=%d", ext2_xattr_set2() 728 /* Decrement the refcount only. */ ext2_xattr_set2() 735 ea_bdebug(old_bh, "refcount now=%d", ext2_xattr_set2() 790 ea_bdebug(bh, "refcount now=%d", ext2_xattr_delete_inode() 929 ea_idebug(inode, "block %ld refcount %d>%d", ext2_xattr_cache_find()
|
/linux-4.4.14/sound/hda/ |
H A D | hdac_i915.c | 62 * snd_hdac_display_power - Power up / down the power refcount 69 * This function manages a refcount and calls the i915 get_power() and
|
/linux-4.4.14/net/netrom/ |
H A D | nr_route.c | 152 atomic_set(&nr_neigh->refcount, 1); nr_add_node() 187 atomic_set(&nr_node->refcount, 1); nr_add_node() 199 /* refcount initialized at 1 */ nr_add_node() 434 atomic_set(&nr_neigh->refcount, 1); nr_add_neigh() 447 /* refcount is initialized at 1 */ nr_add_neigh()
|
/linux-4.4.14/drivers/infiniband/hw/nes/ |
H A D | nes_verbs.c | 126 atomic_set(&cqp_request->refcount, 2); nes_alloc_mw() 183 atomic_set(&cqp_request->refcount, 2); nes_dealloc_mw() 350 atomic_set(&cqp_request->refcount, 2); alloc_fast_reg_mr() 1340 atomic_set(&cqp_request->refcount, 2); nes_create_qp() 1472 "QP%u. cm_id = %p, refcount = %u. \n", nes_destroy_qp() 1473 nesqp->hwqp.qp_id, cm_id, atomic_read(&nesqp->refcount)); nes_destroy_qp() 1723 atomic_set(&cqp_request->refcount, 2); nes_create_cq() 1827 atomic_set(&cqp_request->refcount, 2); nes_destroy_cq() 2039 atomic_set(&cqp_request->refcount, 2); nes_reg_mr() 2685 atomic_set(&cqp_request->refcount, 2); nes_dereg_mr() 2851 nes_debug(NES_DBG_MOD_QP, "QP%u, refcount=%d\n", nes_hw_modify_qp() 2852 nesqp->hwqp.qp_id, atomic_read(&nesqp->refcount)); nes_hw_modify_qp() 2881 atomic_set(&cqp_request->refcount, 2); nes_hw_modify_qp() 2935 " iwarp_state=0x%X, refcount=%d\n", nes_modify_qp() 2937 nesqp->iwarp_state, atomic_read(&nesqp->refcount)); nes_modify_qp() 3127 nes_debug(NES_DBG_MOD_QP, "QP%u Issued ModifyQP refcount (%d)," nes_modify_qp() 3129 nesqp->hwqp.qp_id, atomic_read(&nesqp->refcount), nes_modify_qp() 3134 nes_debug(NES_DBG_MOD_QP, "QP%u Queuing fake disconnect for QP refcount (%d)," nes_modify_qp() 3136 nesqp->hwqp.qp_id, atomic_read(&nesqp->refcount), nes_modify_qp() 3145 nes_debug(NES_DBG_MOD_QP, "QP%u No fake disconnect, QP refcount=%d\n", nes_modify_qp() 3146 nesqp->hwqp.qp_id, atomic_read(&nesqp->refcount)); nes_modify_qp() 3154 nes_debug(NES_DBG_MOD_QP, "QP%u Not decrementing QP refcount (%d)," nes_modify_qp() 3157 nesqp->hwqp.qp_id, atomic_read(&nesqp->refcount), nes_modify_qp() 3164 nes_debug(NES_DBG_MOD_QP, "QP%u Not decrementing QP refcount (%d)," nes_modify_qp() 3167 nesqp->hwqp.qp_id, atomic_read(&nesqp->refcount), nes_modify_qp() 3172 nes_debug(NES_DBG_MOD_QP, "QP%u Decrementing QP refcount (%d), No ae to finish up," nes_modify_qp() 3174 nesqp->hwqp.qp_id, atomic_read(&nesqp->refcount), nes_modify_qp() 3178 nes_debug(NES_DBG_MOD_QP, "QP%u Decrementing QP refcount (%d), No ae to finish up," nes_modify_qp() 3180 nesqp->hwqp.qp_id, atomic_read(&nesqp->refcount), nes_modify_qp() 3186 nes_debug(NES_DBG_MOD_QP, "QP%u Leaving, refcount=%d\n", nes_modify_qp() 3187 nesqp->hwqp.qp_id, atomic_read(&nesqp->refcount)); nes_modify_qp()
|
H A D | nes_verbs.h | 157 atomic_t refcount; member in struct:nes_qp
|
/linux-4.4.14/fs/ |
H A D | direct-io.c | 127 unsigned long refcount; /* direct_io_worker() and bios */ member in struct:dio 301 remaining = --dio->refcount; dio_bio_end_aio() 332 if (--dio->refcount == 1 && dio->waiter) dio_bio_end_io() 396 dio->refcount++; dio_bio_submit() 428 * all bios have been issued so that dio->refcount can only decrease. This 444 while (dio->refcount > 1 && dio->bio_list == NULL) { dio_await_one() 494 * all bios have been issued so that the refcount can only decrease. 711 * dio, and for dropping the refcount which came from that presence. 1077 ret2 = --dio->refcount; drop_refcount() 1237 dio->refcount = 1; do_blockdev_direct_IO()
|
/linux-4.4.14/drivers/staging/lustre/lustre/obdclass/ |
H A D | genops.c | 239 CERROR("type %s has refcount (%d)\n", name, type->typ_refcnt); class_unregister_type() 693 CDEBUG(D_INFO, "GETting export %p : new refcount %d\n", exp, class_export_get() 703 CDEBUG(D_INFO, "PUTting export %p : new refcount %d\n", exp, class_export_put() 720 * pointer to it. The refcount is 2: one for the hash reference, and 871 CDEBUG(D_INFO, "import %p refcount=%d obd=%s\n", import, class_import_get() 883 CDEBUG(D_INFO, "import %p refcount=%d obd=%s\n", imp, class_import_put() 1009 the export handle, so the export refcount is 1 when this function
|
/linux-4.4.14/drivers/pci/hotplug/ |
H A D | acpiphp_glue.c | 35 * - The one in acpiphp_bridge has its refcount elevated by pci_get_slot() 36 * when the bridge is scanned and it loses a refcount when the bridge 38 * - When a P2P bridge is present, we elevate the refcount on the subordinate 39 * bus. It loses the refcount when the the driver unloads. 81 context->refcount = 1; acpiphp_init_context() 102 context->refcount++; acpiphp_get_context() 116 if (--context->refcount) acpiphp_put_context()
|
H A D | acpiphp.h | 122 unsigned int refcount; member in struct:acpiphp_context
|
/linux-4.4.14/drivers/acpi/apei/ |
H A D | erst.c | 439 int refcount; member in struct:erst_record_id_cache 444 .refcount = 0, 471 erst_record_id_cache.refcount++; erst_get_record_id_begin() 562 BUG_ON(!erst_record_id_cache.refcount); erst_get_record_id_next() 603 if (erst_record_id_cache.refcount) __erst_record_id_cache_compact() 627 erst_record_id_cache.refcount--; erst_get_record_id_end() 628 BUG_ON(erst_record_id_cache.refcount < 0); erst_get_record_id_end()
|
/linux-4.4.14/crypto/ |
H A D | api.c | 415 * to construct an algorithm on the fly. A refcount is grabbed on the 531 * to construct an algorithm on the fly. A refcount is grabbed on the 581 * then drops the refcount on the associated algorithm.
|
/linux-4.4.14/fs/cifs/ |
H A D | file.c | 2085 kref_put(&wdata->refcount, cifs_writedata_release); cifs_writepages() 2095 kref_put(&wdata->refcount, cifs_writedata_release); cifs_writepages() 2119 kref_put(&wdata->refcount, cifs_writedata_release); cifs_writepages() 2392 cifs_uncached_writedata_release(struct kref *refcount) cifs_uncached_writedata_release() argument 2395 struct cifs_writedata *wdata = container_of(refcount, cifs_uncached_writedata_release() 2396 struct cifs_writedata, refcount); cifs_uncached_writedata_release() 2400 cifs_writedata_release(refcount); cifs_uncached_writedata_release() 2419 kref_put(&wdata->refcount, cifs_uncached_writedata_release); cifs_uncached_writev_complete() 2543 kref_put(&wdata->refcount, cifs_write_from_iter() 2642 kref_put(&wdata->refcount, cifs_user_writev() 2648 kref_put(&wdata->refcount, cifs_uncached_writedata_release); cifs_user_writev() 2755 kref_init(&rdata->refcount); cifs_readdata_alloc() 2765 cifs_readdata_release(struct kref *refcount) cifs_readdata_release() argument 2767 struct cifs_readdata *rdata = container_of(refcount, cifs_readdata_release() 2768 struct cifs_readdata, refcount); cifs_readdata_release() 2802 cifs_uncached_readdata_release(struct kref *refcount) cifs_uncached_readdata_release() argument 2804 struct cifs_readdata *rdata = container_of(refcount, cifs_uncached_readdata_release() 2805 struct cifs_readdata, refcount); cifs_uncached_readdata_release() 2812 cifs_readdata_release(refcount); cifs_uncached_readdata_release() 2848 kref_put(&rdata->refcount, cifs_uncached_readdata_release); cifs_uncached_readv_complete() 2956 kref_put(&rdata->refcount, cifs_send_async_read() 3030 kref_put(&rdata->refcount, cifs_user_readv() 3044 kref_put(&rdata->refcount, cifs_user_readv() 3057 kref_put(&rdata->refcount, cifs_uncached_readdata_release); cifs_user_readv() 3294 kref_put(&rdata->refcount, cifs_readdata_release); cifs_readv_complete() 3548 kref_put(&rdata->refcount, cifs_readdata_release); cifs_readpages() 3552 kref_put(&rdata->refcount, cifs_readdata_release); cifs_readpages()
|
/linux-4.4.14/fs/ocfs2/dlm/ |
H A D | dlmconvert.c | 231 /* do not alter lock refcount. switching lists. */ __dlmconvert_master() 247 /* do not alter lock refcount. switching lists. */ dlm_revert_pending_convert() 306 /* do not alter lock refcount. switching lists. */ dlmconvert_remote()
|
H A D | dlmdebug.c | 84 atomic_read(&lock->lock_refs.refcount), __dlm_print_lock() 109 res->last_used, atomic_read(&res->refs.refcount), __dlm_print_one_lock_resource() 301 atomic_read(&mle->mle_refs.refcount)); dump_mle() 517 atomic_read(&lock->lock_refs.refcount)); dump_lock() 544 atomic_read(&res->refs.refcount)); dump_lockres() 800 atomic_read(&dlm->dlm_refs.refcount)); debug_state_print()
|
/linux-4.4.14/drivers/char/ipmi/ |
H A D | ipmi_msghandler.c | 102 struct kref refcount; member in struct:ipmi_user 315 struct kref refcount; member in struct:ipmi_smi 554 ipmi_smi_t intf = container_of(ref, struct ipmi_smi, refcount); intf_free() 583 kref_get(&intf->refcount); ipmi_smi_watcher_register() 597 kref_put(&e->intf->refcount, intf_free); ipmi_smi_watcher_register() 610 kref_put(&e->intf->refcount, intf_free); ipmi_smi_watcher_register() 971 /* Note that each existing user holds a refcount to the interface. */ ipmi_create_user() 972 kref_get(&intf->refcount); ipmi_create_user() 974 kref_init(&new_user->refcount); ipmi_create_user() 1012 kref_put(&intf->refcount, intf_free); ipmi_create_user() 1049 ipmi_user_t user = container_of(ref, struct ipmi_user, refcount); free_user() 1112 kref_put(&intf->refcount, intf_free); ipmi_destroy_user() 1114 kref_put(&user->refcount, free_user); ipmi_destroy_user() 1275 kref_get(&user->refcount); ipmi_set_gets_events() 1582 kref_get(&user->refcount); i_ipmi_request() 2797 kref_init(&intf->refcount); ipmi_register_smi() 2907 kref_put(&intf->refcount, intf_free); ipmi_register_smi() 3018 kref_put(&intf->refcount, intf_free); ipmi_unregister_smi() 3117 kref_get(&user->refcount); handle_ipmb_get_msg_cmd() 3172 kref_put(&user->refcount, free_user); handle_ipmb_get_msg_cmd() 3305 kref_get(&user->refcount); handle_lan_get_msg_cmd() 3330 kref_put(&user->refcount, free_user); handle_lan_get_msg_cmd() 3413 kref_get(&user->refcount); handle_oem_get_msg_cmd() 3440 kref_put(&user->refcount, free_user); handle_oem_get_msg_cmd() 3551 kref_get(&user->refcount); handle_read_event_rsp() 4257 kref_put(&msg->user->refcount, free_user); ipmi_free_recv_msg()
|
/linux-4.4.14/drivers/tty/ |
H A D | tty_ldisc.c | 71 new_ldisc->refcount = 0; tty_register_ldisc() 99 if (tty_ldiscs[disc]->refcount) tty_unregister_ldisc() 120 ldops->refcount++; get_ldops() 133 ldops->refcount--; put_ldops()
|
/linux-4.4.14/drivers/usb/atm/ |
H A D | usbatm.h | 156 struct kref refcount; member in struct:usbatm_data
|
/linux-4.4.14/drivers/s390/crypto/ |
H A D | zcrypt_api.h | 105 struct kref refcount; /* device refcounting */ member in struct:zcrypt_device
|
/linux-4.4.14/drivers/infiniband/ulp/isert/ |
H A D | ib_isert.h | 204 int refcount; member in struct:isert_device
|
/linux-4.4.14/drivers/gpu/drm/omapdrm/ |
H A D | omap_gem_dmabuf.c | 193 * refcount on gem itself instead of f_count of dmabuf. omap_gem_prime_import()
|
/linux-4.4.14/drivers/misc/cxl/ |
H A D | main.c | 142 /* Find a CXL adapter by it's number and increase it's refcount */ get_cxl_adapter()
|
/linux-4.4.14/drivers/misc/mei/ |
H A D | debugfs.c | 69 atomic_read(&me_cl->refcnt.refcount)); mei_dbgfs_read_meclients()
|
/linux-4.4.14/net/ax25/ |
H A D | ax25_uid.c | 110 atomic_set(&ax25_uid->refcount, 1); ax25_uid_ioctl()
|
/linux-4.4.14/security/tomoyo/ |
H A D | mount.c | 170 /* Drop refcount obtained by kern_path(). */ tomoyo_mount_acl()
|
/linux-4.4.14/kernel/events/ |
H A D | internal.h | 12 atomic_t refcount; member in struct:ring_buffer
|
H A D | ring_buffer.c | 242 atomic_set(&rb->refcount, 1); ring_buffer_init() 251 if (!atomic_dec_and_test(&rb->refcount)) ring_buffer_put_async() 280 * grab ring_buffer's refcount instead of holding rcu read lock perf_aux_output_begin() 543 * we keep a refcount here to make sure either of the two can rb_alloc_aux()
|
/linux-4.4.14/include/linux/mlx5/ |
H A D | cq.h | 45 atomic_t refcount; member in struct:mlx5_core_cq
|
/linux-4.4.14/arch/frv/mm/ |
H A D | dma-alloc.c | 113 /* set refcount=1 on all pages in an order>0 allocation so that vfree() will actually free consistent_alloc()
|
/linux-4.4.14/drivers/usb/mon/ |
H A D | mon_main.c | 279 * - refcount USB bus struct 413 atomic_set(&mbus->ref.refcount, 2); /* Force leak */ mon_exit()
|
/linux-4.4.14/drivers/remoteproc/ |
H A D | remoteproc_virtio.c | 292 * to decrement the remote processor's refcount which was taken when vdev was 336 * Therefore we must increment the rproc refcount here, and decrement rproc_add_virtio_dev()
|
H A D | remoteproc_core.c | 1111 * this function will just decrement the power refcount and exit, 1118 * - we're not decrementing the rproc's refcount, only the power refcount. 1176 * This function increments the remote processor's refcount, so always 1391 * This function decrements the rproc dev refcount. 1393 * If no one holds any reference to rproc anymore, then its refcount would 1413 * one last refcount, one still needs to call rproc_put().
|
/linux-4.4.14/drivers/media/ |
H A D | media-devnode.c | 174 /* and increase the device refcount */ media_open() 199 /* decrease the refcount unconditionally since the release() media_release()
|
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/engine/fifo/ |
H A D | chan.c | 116 if (!--engn->refcount) { nvkm_fifo_chan_child_del() 148 if (!engn->refcount++) { nvkm_fifo_chan_child_new()
|
/linux-4.4.14/net/irda/ |
H A D | iriap_event.c | 181 /* Don't forget to refcount it - state_s_disconnect() 473 /* Don't forget to refcount it - see state_r_execute()
|
/linux-4.4.14/drivers/phy/ |
H A D | phy-core.c | 351 * after getting a refcount to it or -ENODEV if there is no such phy or 398 * Returns the phy driver, after getting a refcount to it; or 427 * Releases a refcount the caller received from phy_get(). 496 * Returns the phy driver, after getting a refcount to it; or 535 * Returns the phy driver, after getting a refcount to it; or 641 * Gets the phy using _of_phy_get(), then gets a refcount to it,
|
/linux-4.4.14/fs/xfs/ |
H A D | xfs_trace.h | 103 TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno, int refcount, 105 TP_ARGS(mp, agno, refcount, caller_ip), 109 __field(int, refcount) 115 __entry->refcount = refcount; 118 TP_printk("dev %d:%d agno %u refcount %d caller %ps", 121 __entry->refcount, 127 TP_PROTO(struct xfs_mount *mp, xfs_agnumber_t agno, int refcount, \ 129 TP_ARGS(mp, agno, refcount, caller_ip)) 494 "lock %d flags %s recur %d refcount %d bliflags %s "
|