Home
last modified time | relevance | path

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

123456

/Linux-v6.6/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-v6.6/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-v6.6/net/batman-adv/
Doriginator.c75 if (!kref_get_unless_zero(&orig_node->refcount)) in batadv_orig_hash_find()
122 if (!kref_get_unless_zero(&tmp->refcount)) in batadv_orig_node_vlan_get()
307 if (router && !kref_get_unless_zero(&router->refcount)) in batadv_orig_router_get()
335 if (!kref_get_unless_zero(&tmp->refcount)) in batadv_orig_ifinfo_get()
414 if (!kref_get_unless_zero(&tmp_neigh_ifinfo->refcount)) in batadv_neigh_ifinfo_get()
494 if (!kref_get_unless_zero(&tmp_neigh_node->refcount)) in batadv_neigh_node_get()
596 if (!kref_get_unless_zero(&tmp_hardif_neigh->refcount)) in batadv_hardif_neigh_get()
1146 if (!kref_get_unless_zero(&neigh->refcount)) in batadv_find_best_neighbor()
1205 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-v6.6/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-v6.6/include/linux/ceph/
Dstring_table.h56 kref_get_unless_zero(&___str->kref)) \
/Linux-v6.6/include/linux/
Dkref.h109 static inline int __must_check kref_get_unless_zero(struct kref *kref) in kref_get_unless_zero() function
Dtty_port.h166 if (port && kref_get_unless_zero(&port->kref)) in tty_port_get()
Ddma-fence.h321 if (kref_get_unless_zero(&fence->refcount)) in dma_fence_get_rcu()
/Linux-v6.6/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-v6.6/drivers/gpu/drm/i915/
Di915_perf.h45 if (kref_get_unless_zero(&oa_config->ref)) in i915_oa_config_get()
/Linux-v6.6/drivers/gpu/drm/i915/gem/
Di915_gem_throttle.c57 if (!kref_get_unless_zero(&ctx->ref)) in i915_gem_throttle_ioctl()
Di915_gem_region.c179 if (!kref_get_unless_zero(&obj->base.refcount)) in i915_gem_process_region()
/Linux-v6.6/security/apparmor/include/
Dpolicy.h329 if (p && kref_get_unless_zero(&p->label.count)) in aa_get_profile_not0()
349 } 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-v6.6/drivers/gpu/drm/vmwgfx/
Dttm_object.c269 if (!kref_get_unless_zero(&base->refcount)) in ttm_base_object_lookup()
286 if (base && !kref_get_unless_zero(&base->refcount)) in ttm_base_object_lookup_for_ref()
314 if (kref_get_unless_zero(&ref->kref)) { in ttm_ref_object_add()
/Linux-v6.6/drivers/gpu/drm/amd/amdgpu/
Damdgpu_reset.h110 return kref_get_unless_zero(&domain->refcount) != 0; in amdgpu_reset_get_reset_domain()
/Linux-v6.6/drivers/gpu/host1x/
Dchannel.c68 if (!kref_get_unless_zero(&ch->refcount)) in host1x_channel_get_index()
/Linux-v6.6/fs/configfs/
Ditem.c111 if (item && kref_get_unless_zero(&item->ci_kref)) in config_item_get_unless_zero()
/Linux-v6.6/drivers/soc/microchip/
Dmpfs-sys-controller.c185 if (!kref_get_unless_zero(&sys_controller->consumers)) in mpfs_sys_controller_get()
/Linux-v6.6/net/sunrpc/
Dsvcauth.c228 if (!kref_get_unless_zero(&hp->ref)) in auth_domain_find()
/Linux-v6.6/drivers/scsi/elx/efct/
Defct_io.c183 if (kref_get_unless_zero(&io->ref)) in efct_io_find_tgt_io()
/Linux-v6.6/drivers/net/wireguard/
Dpeer.c75 if (unlikely(!peer || !kref_get_unless_zero(&peer->refcount))) in wg_peer_get_maybe_zero()

123456