Home
last modified time | relevance | path

Searched refs:kref_get_unless_zero (Results 1 – 25 of 143) sorted by relevance

123456

/linux-6.12.1/Documentation/translations/zh_CN/core-api/
Dkref.rst231 上面的例子也可以用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-6.12.1/Documentation/core-api/
Dkref.rst237 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-6.12.1/net/batman-adv/
Doriginator.c76 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_router_get()
389 if (!kref_get_unless_zero(&tmp->refcount)) in batadv_orig_ifinfo_get()
468 if (!kref_get_unless_zero(&tmp_neigh_ifinfo->refcount)) in batadv_neigh_ifinfo_get()
548 if (!kref_get_unless_zero(&tmp_neigh_node->refcount)) in batadv_neigh_node_get()
650 if (!kref_get_unless_zero(&tmp_hardif_neigh->refcount)) in batadv_hardif_neigh_get()
1201 if (!kref_get_unless_zero(&neigh->refcount)) in batadv_find_best_neighbor()
1260 if (!kref_get_unless_zero(&hard_iface->refcount)) in batadv_purge_orig_node()
Dhard-interface.h114 if (!kref_get_unless_zero(&hard_iface->refcount)) in batadv_primary_if_get_selected()
Dgateway_client.c89 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-6.12.1/net/ceph/
Dstring_table.c31 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-6.12.1/drivers/gpu/drm/imagination/
Dpvr_context.h144 return ctx != NULL && kref_get_unless_zero(&ctx->ref_count) != 0; in pvr_context_get_if_referenced()
196 if (!kref_get_unless_zero(&ctx->ref_count)) in pvr_context_lookup_id()
Dpvr_free_list.h173 if (free_list && !kref_get_unless_zero(&free_list->ref_count)) in pvr_free_list_lookup_id()
/linux-6.12.1/drivers/infiniband/sw/rxe/
Drxe_pool.c161 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-6.12.1/include/linux/ceph/
Dstring_table.h56 kref_get_unless_zero(&___str->kref)) \
/linux-6.12.1/include/linux/
Dkref.h109 static inline int __must_check kref_get_unless_zero(struct kref *kref) in kref_get_unless_zero() function
/linux-6.12.1/drivers/gpu/drm/i915/
Di915_perf.h45 if (kref_get_unless_zero(&oa_config->ref)) in i915_oa_config_get()
/linux-6.12.1/security/apparmor/include/
Dpolicy.h346 if (p && kref_get_unless_zero(&p->label.count)) in aa_get_profile_not0()
366 } while (c && !kref_get_unless_zero(&c->label.count)); in aa_get_profile_rcu()
Dpolicy_unpack.h134 if (data && kref_get_unless_zero(&(data->count))) in __aa_get_loaddata()
Dlabel.h376 if (l && kref_get_unless_zero(&l->count)) in __aa_get_label()
405 } while (c && !kref_get_unless_zero(&c->count)); in aa_get_label_rcu()
/linux-6.12.1/drivers/gpu/drm/i915/gem/
Di915_gem_throttle.c57 if (!kref_get_unless_zero(&ctx->ref)) in i915_gem_throttle_ioctl()
Di915_gem_object_frontbuffer.h59 if (unlikely(!kref_get_unless_zero(&front->ref))) in i915_gem_object_get_frontbuffer()
Di915_gem_region.c179 if (!kref_get_unless_zero(&obj->base.refcount)) in i915_gem_process_region()
/linux-6.12.1/drivers/gpu/drm/vmwgfx/
Dttm_object.c266 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-6.12.1/drivers/gpu/drm/xe/
Dxe_exec_queue.h36 if (kref_get_unless_zero(&q->refcount)) in xe_exec_queue_get_unless_zero()
/linux-6.12.1/drivers/gpu/drm/amd/amdgpu/
Damdgpu_reset.h124 return kref_get_unless_zero(&domain->refcount) != 0; in amdgpu_reset_get_reset_domain()
/linux-6.12.1/fs/configfs/
Ditem.c111 if (item && kref_get_unless_zero(&item->ci_kref)) in config_item_get_unless_zero()
/linux-6.12.1/drivers/gpu/host1x/
Dchannel.c70 if (!kref_get_unless_zero(&ch->refcount)) in host1x_channel_get_index()
/linux-6.12.1/drivers/soc/microchip/
Dmpfs-sys-controller.c210 if (!kref_get_unless_zero(&sys_controller->consumers)) in mpfs_sys_controller_get()
/linux-6.12.1/drivers/net/wireguard/
Dpeer.c75 if (unlikely(!peer || !kref_get_unless_zero(&peer->refcount))) in wg_peer_get_maybe_zero()

123456