/linux/Documentation/translations/zh_CN/core-api/ |
H A D | kref.rst | 231 上面的例子也可以用kref_get_unless_zero()来优化,方法如下:: 239 if (!kref_get_unless_zero(&entry->refcount)) 262 kref_get_unless_zero被封装在查找表中的同一关键部分,否则kref_get_unless_zero 263 可能引用已经释放的内存。注意,在不检查其返回值的情况下使用kref_get_unless_zero 264 是非法的。如果你确信(已经有了一个有效的指针)kref_get_unless_zero()会返回true, 270 函数kref_get_unless_zero也使得在上述例子中使用rcu锁进行查找成为可能:: 287 if (!kref_get_unless_zero(&entry->refcount))
|
/linux/Documentation/core-api/ |
H A D | kref.rst | 237 The above example could also be optimized using kref_get_unless_zero() in 246 if (!kref_get_unless_zero(&entry->refcount)) 269 it's important that kref_get_unless_zero is enclosed in the same critical 271 otherwise kref_get_unless_zero may reference already freed memory. 272 Note that it is illegal to use kref_get_unless_zero without checking its 274 kref_get_unless_zero() will return true, then use kref_get() instead. 279 The function kref_get_unless_zero also makes it possible to use rcu 297 if (!kref_get_unless_zero(&entry->refcount))
|
/linux/net/batman-adv/ |
H A D | originator.c | 76 if (!kref_get_unless_zero(&orig_node->refcount)) in batadv_orig_hash_find() 123 if (!kref_get_unless_zero(&tmp->refcount)) in batadv_orig_node_vlan_get() 334 if (router && !kref_get_unless_zero(&router->refcount)) in batadv_orig_to_router() 389 if (!kref_get_unless_zero(&tmp->refcount)) in batadv_orig_ifinfo_new() 468 if (!kref_get_unless_zero(&tmp_neigh_ifinfo->refcount)) in batadv_neigh_ifinfo_new() 548 if (!kref_get_unless_zero(&tmp_neigh_node->refcount)) in batadv_hardif_neigh_create() 650 if (!kref_get_unless_zero(&tmp_hardif_neigh->refcount)) in batadv_neigh_node_create() 1201 if (!kref_get_unless_zero(&neigh->refcount)) in batadv_purge_orig_node() 1260 if (!kref_get_unless_zero(&hard_iface->refcount)) in batadv_purge_orig_ref()
|
H A D | hard-interface.h | 114 if (!kref_get_unless_zero(&hard_iface->refcount)) in batadv_primary_if_get_selected()
|
H A D | gateway_client.c | 89 if (!kref_get_unless_zero(&gw_node->refcount)) in batadv_gw_get_selected_gw_node() 118 if (!kref_get_unless_zero(&orig_node->refcount)) in batadv_gw_get_selected_orig() 381 if (!kref_get_unless_zero(&gw_node_tmp->refcount)) in batadv_gw_node_get()
|
/linux/net/ceph/ |
H A D | string_table.c | 31 if (exist && !kref_get_unless_zero(&exist->kref)) { in ceph_find_or_create_string() 70 } else if (!kref_get_unless_zero(&exist->kref)) { in ceph_find_or_create_string()
|
/linux/drivers/infiniband/sw/rxe/ |
H A D | rxe_pool.c | 161 if (elem && kref_get_unless_zero(&elem->ref_cnt)) in rxe_pool_get_index() 242 return kref_get_unless_zero(&elem->ref_cnt); in __rxe_get()
|
/linux/security/apparmor/include/ |
H A D | policy.h | 345 if (p && kref_get_unless_zero(&p->label.count)) in aa_get_profile_not0() 365 } while (c && !kref_get_unless_zero(&c->label.count)); in aa_get_profile_rcu()
|
H A D | policy_unpack.h | 134 if (data && kref_get_unless_zero(&(data->count))) in __aa_get_loaddata()
|
H A D | label.h | 348 if (l && kref_get_unless_zero(&l->count)) in aa_label_str_split() 377 } while (c && !kref_get_unless_zero(&c->count)); in __aa_get_label()
|
/linux/include/linux/ceph/ |
H A D | string_table.h | 56 kref_get_unless_zero(&___str->kref)) \
|
/linux/include/linux/ |
H A D | kref.h | 109 static inline int __must_check kref_get_unless_zero(struct kref *kref) in kref_get_unless_zero() function
|
H A D | tty_port.h | 166 if (port && kref_get_unless_zero(&port->kref)) in tty_port_get()
|
/linux/drivers/gpu/drm/i915/ |
H A D | i915_perf.h | 45 if (kref_get_unless_zero(&oa_config->ref)) in i915_oa_config_get()
|
/linux/drivers/gpu/drm/vmwgfx/ |
H A D | ttm_object.c | 266 if (!kref_get_unless_zero(&base->refcount)) in ttm_base_object_lookup() 283 if (base && !kref_get_unless_zero(&base->refcount)) in ttm_base_object_lookup_for_ref() 311 if (kref_get_unless_zero(&ref->kref)) { in ttm_ref_object_add()
|
/linux/drivers/gpu/drm/i915/gem/ |
H A D | i915_gem_throttle.c | 57 if (!kref_get_unless_zero(&ctx->ref)) in i915_gem_throttle_ioctl()
|
H A D | i915_gem_object_frontbuffer.h | 59 if (unlikely(!kref_get_unless_zero(&front->ref))) in i915_gem_object_get_frontbuffer()
|
H A D | i915_gem_region.c | 179 if (!kref_get_unless_zero(&obj->base.refcount)) in i915_gem_process_region()
|
/linux/drivers/gpu/drm/imagination/ |
H A D | pvr_free_list.h | 173 if (free_list && !kref_get_unless_zero(&free_list->ref_count)) in pvr_free_list_lookup_id()
|
/linux/drivers/gpu/drm/xe/ |
H A D | xe_exec_queue.h | 36 if (kref_get_unless_zero(&q->refcount)) in xe_exec_queue_get_unless_zero()
|
/linux/fs/configfs/ |
H A D | item.c | 111 if (item && kref_get_unless_zero(&item->ci_kref)) in config_item_get_unless_zero()
|
/linux/drivers/gpu/host1x/ |
H A D | channel.c | 70 if (!kref_get_unless_zero(&ch->refcount)) in host1x_channel_get_index()
|
/linux/drivers/scsi/elx/efct/ |
H A D | efct_io.c | 183 if (kref_get_unless_zero(&io->ref)) in efct_io_find_tgt_io()
|
/linux/drivers/net/wireguard/ |
H A D | peer.c | 75 if (unlikely(!peer || !kref_get_unless_zero(&peer->refcount))) in wg_peer_get_maybe_zero()
|
/linux/net/sunrpc/ |
H A D | svcauth.c | 271 if (!kref_get_unless_zero(&hp->ref)) in auth_domain_find()
|