| /linux/drivers/block/ |
| H A D | swim.c | 187 int ref_count; member 617 if (fs->ref_count == -1 || (fs->ref_count && mode & BLK_OPEN_EXCL)) in floppy_open() 620 fs->ref_count = -1; in floppy_open() 622 fs->ref_count++; in floppy_open() 650 if (fs->ref_count < 0) in floppy_open() 651 fs->ref_count = 0; in floppy_open() 652 else if (fs->ref_count > 0) in floppy_open() 653 --fs->ref_count; in floppy_open() 655 if (fs->ref_count == 0) in floppy_open() 677 if (fs->ref_count < 0) in floppy_release() [all …]
|
| H A D | swim3.c | 195 int ref_count; member 901 if (fs->ref_count != 1) in floppy_locked_ioctl() 932 if (fs->ref_count == 0) { in floppy_open() 961 } else if (fs->ref_count == -1 || mode & BLK_OPEN_EXCL) in floppy_open() 980 if (fs->ref_count == 0) { in floppy_open() 989 fs->ref_count = -1; in floppy_open() 991 ++fs->ref_count; in floppy_open() 1013 if (fs->ref_count > 0) in floppy_release() 1014 --fs->ref_count; in floppy_release() 1015 else if (fs->ref_count == -1) in floppy_release() [all …]
|
| /linux/drivers/gpu/drm/imagination/ |
| H A D | pvr_hwrt.h | 59 struct kref ref_count; member 108 kref_get(&hwrt->ref_count); in pvr_hwrt_dataset_lookup() 161 kref_get(&hwrt->hwrt_dataset->ref_count); in pvr_hwrt_data_get()
|
| H A D | pvr_free_list.h | 49 struct kref ref_count; member 120 kref_get(&free_list->ref_count); in pvr_free_list_get() 173 if (free_list && !kref_get_unless_zero(&free_list->ref_count)) in pvr_free_list_lookup_id()
|
| H A D | pvr_job.h | 35 struct kref ref_count; member 107 kref_get(&job->ref_count); in pvr_job_get()
|
| H A D | pvr_context.c | 305 kref_init(&ctx->ref_count); in pvr_context_create() 377 pvr_context_release(struct kref *ref_count) in pvr_context_release() argument 380 container_of(ref_count, struct pvr_context, ref_count); in pvr_context_release() 404 kref_put(&ctx->ref_count, pvr_context_release); in pvr_context_put()
|
| H A D | pvr_hwrt.c | 483 kref_init(&hwrt->ref_count); in pvr_hwrt_dataset_create() 500 pvr_hwrt_dataset_release(struct kref *ref_count) in pvr_hwrt_dataset_release() argument 503 container_of(ref_count, struct pvr_hwrt_dataset, ref_count); in pvr_hwrt_dataset_release() 545 kref_put(&hwrt->ref_count, pvr_hwrt_dataset_release); in pvr_hwrt_dataset_put()
|
| H A D | pvr_free_list.c | 424 kref_init(&free_list->ref_count); in pvr_free_list_create() 471 pvr_free_list_release(struct kref *ref_count) in pvr_free_list_release() argument 474 container_of(ref_count, struct pvr_free_list, ref_count); in pvr_free_list_release() 539 kref_put(&free_list->ref_count, pvr_free_list_release); in pvr_free_list_put()
|
| H A D | pvr_vm.c | 60 struct kref ref_count; member 78 kref_get(&vm_ctx->ref_count); in pvr_vm_context_get() 595 kref_init(&vm_ctx->ref_count); in pvr_vm_create_context() 616 pvr_vm_context_release(struct kref *ref_count) in pvr_vm_context_release() argument 619 container_of(ref_count, struct pvr_vm_context, ref_count); in pvr_vm_context_release() 669 return kref_put(&vm_ctx->ref_count, pvr_vm_context_release); in pvr_vm_context_put()
|
| /linux/drivers/net/ethernet/marvell/prestera/ |
| H A D | prestera_span.c | 16 refcount_t ref_count; member 34 refcount_set(&entry->ref_count, 1); in prestera_span_entry_create() 84 refcount_inc(&entry->ref_count); in prestera_span_get() 112 if (!refcount_dec_and_test(&entry->ref_count)) in prestera_span_put()
|
| /linux/net/l2tp/ |
| H A D | l2tp_core.c | 189 refcount_inc_not_zero(&tunnel->ref_count)) { in l2tp_sk_to_tunnel() 202 if (refcount_dec_and_test(&tunnel->ref_count)) in l2tp_tunnel_put() 209 if (refcount_dec_and_test(&session->ref_count)) in l2tp_session_put() 222 if (tunnel && refcount_inc_not_zero(&tunnel->ref_count)) { in l2tp_tunnel_get() 241 if (refcount_inc_not_zero(&tunnel->ref_count)) { in l2tp_tunnel_get_next() 262 refcount_inc_not_zero(&session->ref_count)) { in l2tp_v3_session_get() 285 refcount_inc_not_zero(&session->ref_count)) { in l2tp_v3_session_get() 305 if (session && refcount_inc_not_zero(&session->ref_count)) { in l2tp_v2_session_get() 349 refcount_inc_not_zero(&session->ref_count)) { in l2tp_v2_session_get_next() 377 refcount_inc_not_zero(&session->ref_count)) { in l2tp_v3_session_get_next() [all …]
|
| H A D | l2tp_core.h | 58 refcount_t ref_count; member 89 refcount_t ref_count; member 177 refcount_t ref_count; member
|
| /linux/drivers/net/ethernet/mellanox/mlx5/core/ |
| H A D | uar.c | 83 struct mlx5_uars_page *up = container_of(kref, struct mlx5_uars_page, ref_count); in up_rel_func() 149 kref_init(&up->ref_count); in alloc_uars_page() 172 kref_get(&ret->ref_count); in mlx5_get_uars_page() 189 kref_put(&up->ref_count, up_rel_func); in mlx5_put_uars_page() 233 kref_get(&up->ref_count); in alloc_bfreg() 324 kref_put(&up->ref_count, up_rel_func); in mlx5_free_bfreg()
|
| /linux/drivers/s390/char/ |
| H A D | raw3270.h | 78 atomic_t ref_count; member 106 atomic_inc(&view->ref_count); in raw3270_get_view() 114 if (atomic_dec_return(&view->ref_count) == 0) in raw3270_put_view()
|
| /linux/fs/smb/client/ |
| H A D | cifs_swn.c | 24 struct kref ref_count; member 35 unsigned int ref_count; member 47 info->ref_count = kref_read(&swnreg->ref_count); in cifs_swn_snapshot_reg() 440 kref_get(®->ref_count); in cifs_get_swn_reg() 452 kref_init(®->ref_count); in cifs_get_swn_reg() 496 struct cifs_swn_reg *swnreg = container_of(ref, struct cifs_swn_reg, ref_count); in cifs_swn_reg_release() 507 if (kref_read(&swnreg->ref_count) == 1) { in cifs_put_swn_reg_locked() 518 kref_put(&swnreg->ref_count, cifs_swn_reg_release); in cifs_put_swn_reg_locked() 818 swnreg_info.id, swnreg_info.ref_count, in cifs_swn_dump()
|
| /linux/drivers/net/ethernet/mellanox/mlx5/core/lib/ |
| H A D | mpfs.c | 69 int ref_count; member 150 l2addr->ref_count++; in mlx5_mpfs_add_mac() 174 l2addr->ref_count = 1; in mlx5_mpfs_add_mac() 206 if (--l2addr->ref_count > 0) in mlx5_mpfs_del_mac()
|
| /linux/drivers/irqchip/ |
| H A D | irq-pruss-intc.c | 80 u8 ref_count; member 186 intc->event_channel[hwirq].ref_count++; in pruss_intc_map() 200 if (++intc->channel_host[ch].ref_count == 1) { in pruss_intc_map() 232 if (--intc->channel_host[ch].ref_count == 0) { in pruss_intc_unmap() 240 intc->event_channel[hwirq].ref_count--; in pruss_intc_unmap() 384 if (intc->event_channel[event].ref_count > 0 && in pruss_intc_validate_mapping() 393 if (intc->channel_host[channel].ref_count > 0 && in pruss_intc_validate_mapping()
|
| /linux/sound/hda/core/ext/ |
| H A D | controller.c | 111 hlink->ref_count = 1; in snd_hdac_ext_bus_get_ml_capabilities() 311 if (++hlink->ref_count == 1) { in snd_hdac_ext_bus_link_get() 353 if (--hlink->ref_count == 0) { in snd_hdac_ext_bus_link_put() 361 if (hlink_tmp->ref_count) { in snd_hdac_ext_bus_link_put()
|
| /linux/drivers/net/ethernet/mellanox/mlxsw/ |
| H A D | spectrum_span.c | 39 refcount_t ref_count; member 48 refcount_t ref_count; member 861 if (!refcount_read(&mlxsw_sp->span->entries[i].ref_count)) { in mlxsw_sp_span_entry_create() 880 refcount_set(&span_entry->ref_count, 1); in mlxsw_sp_span_entry_create() 905 if (refcount_read(&curr->ref_count) && curr->to_dev == to_dev) in mlxsw_sp_span_entry_find_by_port() 926 if (refcount_read(&curr->ref_count) && curr->id == span_id) in mlxsw_sp_span_entry_find_by_id() 942 if (refcount_read(&curr->ref_count) && curr->to_dev == to_dev && in mlxsw_sp_span_entry_find_by_parms() 963 refcount_inc(&span_entry->ref_count); in mlxsw_sp_span_entry_get() 973 if (refcount_dec_and_test(&span_entry->ref_count)) in mlxsw_sp_span_entry_put() 1043 if (!refcount_read(&curr->ref_count)) in mlxsw_sp_span_respin_work() [all …]
|
| H A D | core_acl_flex_actions.c | 98 refcount_t ref_count; member 123 refcount_t ref_count; member 135 refcount_t ref_count; member 185 refcount_t ref_count; member 285 refcount_set(&set->ref_count, 1); in mlxsw_afa_set_create() 333 if (!refcount_dec_and_test(&set->ref_count)) in mlxsw_afa_set_put() 353 refcount_inc(&set->ref_count); in mlxsw_afa_set_get() 567 refcount_set(&fwd_entry->ref_count, 1); in mlxsw_afa_fwd_entry_create() 610 refcount_inc(&fwd_entry->ref_count); in mlxsw_afa_fwd_entry_get() 619 if (!refcount_dec_and_test(&fwd_entry->ref_count)) in mlxsw_afa_fwd_entry_put() [all …]
|
| /linux/drivers/net/ethernet/mellanox/mlx4/ |
| H A D | resource_tracker.c | 58 int ref_count; member 66 int ref_count; member 117 atomic_t ref_count; member 146 atomic_t ref_count; member 182 atomic_t ref_count; member 195 atomic_t ref_count; member 1057 atomic_set(&ret->ref_count, 0); in alloc_qp_tr() 1073 atomic_set(&ret->ref_count, 0); in alloc_mtt_tr() 1117 atomic_set(&ret->ref_count, 0); in alloc_cq_tr() 1132 atomic_set(&ret->ref_count, 0); in alloc_srq_tr() [all …]
|
| /linux/drivers/gpu/drm/lima/ |
| H A D | lima_vm.c | 14 unsigned int ref_count; member 101 bo_va->ref_count++; in lima_vm_bo_add() 119 bo_va->ref_count = 1; in lima_vm_bo_add() 163 if (--bo_va->ref_count > 0) { in lima_vm_bo_del()
|
| /linux/arch/s390/mm/ |
| H A D | extmem.c | 69 refcount_t ref_count; member 370 refcount_set(&seg->ref_count, 1); in __segment_load() 430 refcount_inc(&seg->ref_count); in segment_load() 476 if (refcount_read(&seg->ref_count) != 1) { in segment_modify_shared() 559 if (!refcount_dec_and_test(&seg->ref_count)) in segment_unload()
|
| /linux/drivers/net/ethernet/broadcom/ |
| H A D | cnic_if.h | 304 atomic_t ref_count; member 339 atomic_t ref_count; member 382 atomic_t ref_count; member
|
| /linux/drivers/mtd/ubi/ |
| H A D | build.c | 270 ubi_assert(ubi->ref_count >= 0); in ubi_get_device() 271 ubi->ref_count += 1; in ubi_get_device() 286 ubi->ref_count -= 1; in ubi_put_device() 307 ubi_assert(ubi->ref_count >= 0); in ubi_get_by_major() 308 ubi->ref_count += 1; in ubi_get_by_major() 1120 ubi->ref_count -= 1; in ubi_detach_mtd_dev() 1121 if (ubi->ref_count) { in ubi_detach_mtd_dev() 1129 ubi->ubi_name, ubi->ref_count); in ubi_detach_mtd_dev()
|