kref
kref_init(&kobj->kref);
void linux_kobject_release(struct kref *kref);
kref_put(&kobj->kref, linux_kobject_release);
kref_get(&kobj->kref);
struct kref kref;
kref_get_unless_zero(struct kref *kref)
return refcount_acquire_if_not_zero((uint32_t *)&kref->refcount);
static inline int kref_put_mutex(struct kref *kref,
void (*release)(struct kref *kref), struct mutex *lock)
if (unlikely(!refcount_release_if_not_last((uint32_t *)&kref->refcount))) {
if (unlikely(!refcount_release((uint32_t *)&kref->refcount))) {
release(kref);
kref_init(struct kref *kref)
refcount_init((uint32_t *)&kref->refcount, 1);
kref_read(const struct kref *kref)
return (refcount_load(__DECONST(u_int32_t *, &kref->refcount)));
kref_get(struct kref *kref)
refcount_acquire((uint32_t *)&kref->refcount);
kref_put(struct kref *kref, void (*rel)(struct kref *kref))
if (refcount_release((uint32_t *)&kref->refcount)) {
rel(kref);
kref_put_lock(struct kref *kref, void (*rel)(struct kref *kref),
if (refcount_release((uint32_t *)&kref->refcount)) {
rel(kref);
kref_sub(struct kref *kref, unsigned int count,
void (*rel)(struct kref *kref))
if (refcount_release((uint32_t *)&kref->refcount)) {
rel(kref);
linux_kobject_release(struct kref *kref)
kobj = container_of(kref, struct kobject, kref);
kref_init(&epc->kref);
void _c4iw_free_ep(struct kref *kref)
ep = container_of(kref, struct c4iw_ep, com.kref);
struct kref kref;
__func__, __LINE__, ep, kref_read(&(ep)->kref)); \
WARN_ON(kref_read(&(ep)->kref) < 1); \
kref_put(&((ep)->kref), _c4iw_free_ep); \
__func__, __LINE__, ep, kref_read(&(ep)->kref)); \
kref_get(&((ep)->kref)); \
void _c4iw_free_ep(struct kref *kref);
struct kref kref;
BUG_ON(kref_read(&qhp->ep->com.kref) < 2);
kref_init(&qhp->kref);
static void queue_qp_free(struct kref *kref)
qhp = container_of(kref, struct c4iw_qp, kref);
kref_get(&to_c4iw_qp(qp)->kref);
kref_put(&to_c4iw_qp(qp)->kref, queue_qp_free);
MPASS(atomic_read(&bo->kref) == 0);
refcount_init(&bo->kref, 1);
if (refcount_release(&bo->kref))
u_int kref;
refcount_acquire(&bo->kref);
refcount_init(&fbo->kref, 1);
refcount_acquire(&bo->kref);
u_int kref;
refcount_acquire(&ref->kref);
refcount_init(&ref->kref, 1);
if (refcount_release(&ref->kref))
struct kref ref_count;
static void up_rel_func(struct kref *kref)
struct mlx5_uars_page *up = container_of(kref, struct mlx5_uars_page, ref_count);
struct kref mcref;
static inline void release_mc(struct kref *kref)
struct cma_multicast *mc = container_of(kref, struct cma_multicast, mcref);
static void rdma_user_mmap_entry_free(struct kref *kref)
container_of(kref, struct rdma_user_mmap_entry, ref);
static void uverbs_uobject_free(struct kref *ref)
static void free_sm_ah(struct kref *kref)
struct ib_sa_sm_ah *sm_ah = container_of(kref, struct ib_sa_sm_ah, ref);
struct kref ref;
void ib_uverbs_release_file(struct kref *ref)
struct kref ref;
void ib_uverbs_release_file(struct kref *ref);
struct kref ref;
void ipoib_free_ah(struct kref *kref);
void ipoib_free_ah(struct kref *kref)
struct ipoib_ah *ah = container_of(kref, struct ipoib_ah, ref);
struct kref ref;
struct kref ref;
struct kref ref;