Home
last modified time | relevance | path

Searched refs:ref (Results 1 – 25 of 167) sorted by relevance

1234567

/linux-4.19.296/lib/
Dpercpu-refcount.c39 static unsigned long __percpu *percpu_count_ptr(struct percpu_ref *ref) in percpu_count_ptr() argument
42 (ref->percpu_count_ptr & ~__PERCPU_REF_ATOMIC_DEAD); in percpu_count_ptr()
59 int percpu_ref_init(struct percpu_ref *ref, percpu_ref_func_t *release, in percpu_ref_init() argument
66 ref->percpu_count_ptr = (unsigned long) in percpu_ref_init()
68 if (!ref->percpu_count_ptr) in percpu_ref_init()
71 ref->force_atomic = flags & PERCPU_REF_INIT_ATOMIC; in percpu_ref_init()
74 ref->percpu_count_ptr |= __PERCPU_REF_ATOMIC; in percpu_ref_init()
79 ref->percpu_count_ptr |= __PERCPU_REF_DEAD; in percpu_ref_init()
83 atomic_long_set(&ref->count, start_count); in percpu_ref_init()
85 ref->release = release; in percpu_ref_init()
[all …]
/linux-4.19.296/include/linux/
Dpercpu-refcount.h101 int __must_check percpu_ref_init(struct percpu_ref *ref,
104 void percpu_ref_exit(struct percpu_ref *ref);
105 void percpu_ref_switch_to_atomic(struct percpu_ref *ref,
107 void percpu_ref_switch_to_atomic_sync(struct percpu_ref *ref);
108 void percpu_ref_switch_to_percpu(struct percpu_ref *ref);
109 void percpu_ref_kill_and_confirm(struct percpu_ref *ref,
111 void percpu_ref_reinit(struct percpu_ref *ref);
125 static inline void percpu_ref_kill(struct percpu_ref *ref) in percpu_ref_kill() argument
127 percpu_ref_kill_and_confirm(ref, NULL); in percpu_ref_kill()
136 static inline bool __ref_is_percpu(struct percpu_ref *ref, in __ref_is_percpu() argument
[all …]
/linux-4.19.296/fs/jffs2/
Dxattr.c444 static int verify_xattr_ref(struct jffs2_sb_info *c, struct jffs2_xattr_ref *ref) in verify_xattr_ref() argument
454 if (ref_flags(ref->node) != REF_UNCHECKED) in verify_xattr_ref()
456 offset = ref_offset(ref->node); in verify_xattr_ref()
482 ref->ino = je32_to_cpu(rr.ino); in verify_xattr_ref()
483 ref->xid = je32_to_cpu(rr.xid); in verify_xattr_ref()
484 ref->xseqno = je32_to_cpu(rr.xseqno); in verify_xattr_ref()
485 if (ref->xseqno > c->highest_xseqno) in verify_xattr_ref()
486 c->highest_xseqno = (ref->xseqno & ~XREF_DELETE_MARKER); in verify_xattr_ref()
490 for (raw=ref->node; raw != (void *)ref; raw=raw->next_in_ino) { in verify_xattr_ref()
497 raw->flash_offset = ref_offset(raw) | ((ref->node==raw) ? REF_PRISTINE : REF_NORMAL); in verify_xattr_ref()
[all …]
Dmalloc.c204 struct jffs2_raw_node_ref **p, *ref; in jffs2_prealloc_raw_node_refs() local
210 ref = *p; in jffs2_prealloc_raw_node_refs()
215 if (ref && ref->flash_offset != REF_EMPTY_NODE) in jffs2_prealloc_raw_node_refs()
216 ref++; in jffs2_prealloc_raw_node_refs()
219 if (!ref) { in jffs2_prealloc_raw_node_refs()
221 ref = *p = jffs2_alloc_refblock(); in jffs2_prealloc_raw_node_refs()
222 if (!ref) in jffs2_prealloc_raw_node_refs()
225 if (ref->flash_offset == REF_LINK_NODE) { in jffs2_prealloc_raw_node_refs()
226 p = &ref->next_in_ino; in jffs2_prealloc_raw_node_refs()
227 ref = *p; in jffs2_prealloc_raw_node_refs()
[all …]
Dnodelist.c590 struct jffs2_raw_node_ref *ref; in jffs2_link_node_ref() local
595 ref = jeb->last_node; in jffs2_link_node_ref()
597 dbg_noderef("Last node at %p is (%08x,%p)\n", ref, ref->flash_offset, in jffs2_link_node_ref()
598 ref->next_in_ino); in jffs2_link_node_ref()
600 while (ref->flash_offset != REF_EMPTY_NODE) { in jffs2_link_node_ref()
601 if (ref->flash_offset == REF_LINK_NODE) in jffs2_link_node_ref()
602 ref = ref->next_in_ino; in jffs2_link_node_ref()
604 ref++; in jffs2_link_node_ref()
607 dbg_noderef("New ref is %p (%08x becomes %08x,%p) len 0x%x\n", ref, in jffs2_link_node_ref()
608 ref->flash_offset, ofs, ref->next_in_ino, len); in jffs2_link_node_ref()
[all …]
Dreadinode.c33 struct jffs2_raw_node_ref *ref = tn->fn->raw; in check_node_data() local
43 ofs = ref_offset(ref) + sizeof(struct jffs2_raw_inode); in check_node_data()
53 ref_offset(ref), tn->csize, ofs); in check_node_data()
62 ref_offset(ref), tn->csize, tn->partial_crc, tn->data_crc, ofs - len, ofs, len); in check_node_data()
109 ref_offset(ref), tn->data_crc, crc); in check_node_data()
114 jeb = &c->blocks[ref->flash_offset / c->sector_size]; in check_node_data()
115 len = ref_totlen(c, jeb, ref); in check_node_data()
120 ref->flash_offset |= REF_PRISTINE; in check_node_data()
568 static struct jffs2_raw_node_ref *jffs2_first_valid_node(struct jffs2_raw_node_ref *ref) in jffs2_first_valid_node() argument
570 while (ref && ref->next_in_ino) { in jffs2_first_valid_node()
[all …]
Dnodelist.h101 static inline struct jffs2_raw_node_ref *ref_next(struct jffs2_raw_node_ref *ref) in ref_next() argument
103 ref++; in ref_next()
106 if (ref->flash_offset == REF_LINK_NODE) { in ref_next()
107 ref = ref->next_in_ino; in ref_next()
108 if (!ref) in ref_next()
109 return ref; in ref_next()
113 if (ref->flash_offset == REF_EMPTY_NODE) in ref_next()
116 return ref; in ref_next()
136 #define ref_flags(ref) ((ref)->flash_offset & 3) argument
137 #define ref_offset(ref) ((ref)->flash_offset & ~3) argument
[all …]
Dnodemgmt.c579 void jffs2_mark_node_obsolete(struct jffs2_sb_info *c, struct jffs2_raw_node_ref *ref) in jffs2_mark_node_obsolete() argument
588 if(unlikely(!ref)) { in jffs2_mark_node_obsolete()
592 if (ref_obsolete(ref)) { in jffs2_mark_node_obsolete()
594 __func__, ref_offset(ref)); in jffs2_mark_node_obsolete()
597 blocknr = ref->flash_offset / c->sector_size; in jffs2_mark_node_obsolete()
600 ref->flash_offset); in jffs2_mark_node_obsolete()
618 freed_len = ref_totlen(c, jeb, ref); in jffs2_mark_node_obsolete()
620 if (ref_flags(ref) == REF_UNCHECKED) { in jffs2_mark_node_obsolete()
624 ref->flash_offset, jeb->used_size); in jffs2_mark_node_obsolete()
628 ref_offset(ref), freed_len); in jffs2_mark_node_obsolete()
[all …]
Derase.c209 struct jffs2_raw_node_ref *ref, struct jffs2_eraseblock *jeb) in jffs2_remove_node_refs_from_ino_list() argument
214 prev = &ref->next_in_ino; in jffs2_remove_node_refs_from_ino_list()
235 if (this == ref) in jffs2_remove_node_refs_from_ino_list()
291 struct jffs2_raw_node_ref *block, *ref; in jffs2_free_jeb_node_refs() local
295 block = ref = jeb->first_node; in jffs2_free_jeb_node_refs()
297 while (ref) { in jffs2_free_jeb_node_refs()
298 if (ref->flash_offset == REF_LINK_NODE) { in jffs2_free_jeb_node_refs()
299 ref = ref->next_in_ino; in jffs2_free_jeb_node_refs()
301 block = ref; in jffs2_free_jeb_node_refs()
304 if (ref->flash_offset != REF_EMPTY_NODE && ref->next_in_ino) in jffs2_free_jeb_node_refs()
[all …]
/linux-4.19.296/drivers/clk/mxs/
Dclk-ref.c39 struct clk_ref *ref = to_clk_ref(hw); in clk_ref_enable() local
41 writel_relaxed(1 << ((ref->idx + 1) * 8 - 1), ref->reg + CLR); in clk_ref_enable()
48 struct clk_ref *ref = to_clk_ref(hw); in clk_ref_disable() local
50 writel_relaxed(1 << ((ref->idx + 1) * 8 - 1), ref->reg + SET); in clk_ref_disable()
56 struct clk_ref *ref = to_clk_ref(hw); in clk_ref_recalc_rate() local
58 u8 frac = (readl_relaxed(ref->reg) >> (ref->idx * 8)) & 0x3f; in clk_ref_recalc_rate()
92 struct clk_ref *ref = to_clk_ref(hw); in clk_ref_set_rate() local
96 u8 frac, shift = ref->idx * 8; in clk_ref_set_rate()
109 val = readl_relaxed(ref->reg); in clk_ref_set_rate()
112 writel_relaxed(val, ref->reg); in clk_ref_set_rate()
[all …]
/linux-4.19.296/fs/btrfs/
Ddelayed-ref.c227 struct btrfs_delayed_ref_node *ref) in drop_delayed_ref() argument
230 rb_erase(&ref->ref_node, &head->ref_tree); in drop_delayed_ref()
231 RB_CLEAR_NODE(&ref->ref_node); in drop_delayed_ref()
232 if (!list_empty(&ref->add_list)) in drop_delayed_ref()
233 list_del(&ref->add_list); in drop_delayed_ref()
234 ref->in_tree = 0; in drop_delayed_ref()
235 btrfs_put_delayed_ref(ref); in drop_delayed_ref()
242 struct btrfs_delayed_ref_node *ref, in merge_ref() argument
246 struct rb_node *node = rb_next(&ref->ref_node); in merge_ref()
256 if (comp_refs(ref, next, false)) in merge_ref()
[all …]
Dref-verify.c51 struct ref_entry ref; member
162 struct ref_entry *ref) in insert_ref_entry() argument
172 cmp = comp_refs(entry, ref); in insert_ref_entry()
181 rb_link_node(&ref->node, parent_node, p); in insert_ref_entry()
182 rb_insert_color(&ref->node, root); in insert_ref_entry()
246 struct ref_entry *ref; in free_block_entry() local
257 ref = rb_entry(n, struct ref_entry, node); in free_block_entry()
258 rb_erase(&ref->node, &be->refs); in free_block_entry()
259 kfree(ref); in free_block_entry()
325 struct ref_entry *ref = NULL, *exist; in add_tree_block() local
[all …]
Dbackref.c166 static void free_pref(struct prelim_ref *ref) in free_pref() argument
168 kmem_cache_free(btrfs_prelim_ref_cache, ref); in free_pref()
232 struct prelim_ref *ref; in prelim_ref_insert() local
240 ref = rb_entry(parent, struct prelim_ref, rbnode); in prelim_ref_insert()
241 result = prelim_ref_compare(ref, newref); in prelim_ref_insert()
248 struct extent_inode_elem *eie = ref->inode_list; in prelim_ref_insert()
254 ref->inode_list = newref->inode_list; in prelim_ref_insert()
257 trace_btrfs_prelim_ref_merge(fs_info, ref, newref, in prelim_ref_insert()
264 update_share_count(sc, ref->count, in prelim_ref_insert()
265 ref->count + newref->count); in prelim_ref_insert()
[all …]
Dinode-item.c15 struct btrfs_inode_ref *ref; in btrfs_find_name_in_backref() local
25 ref = (struct btrfs_inode_ref *)(ptr + cur_offset); in btrfs_find_name_in_backref()
26 len = btrfs_inode_ref_name_len(leaf, ref); in btrfs_find_name_in_backref()
27 name_ptr = (unsigned long)(ref + 1); in btrfs_find_name_in_backref()
28 cur_offset += len + sizeof(*ref); in btrfs_find_name_in_backref()
33 *ref_ret = ref; in btrfs_find_name_in_backref()
188 struct btrfs_inode_ref *ref; in btrfs_del_inode_ref() local
196 int del_len = name_len + sizeof(*ref); in btrfs_del_inode_ref()
217 name, name_len, &ref)) { in btrfs_del_inode_ref()
226 *index = btrfs_inode_ref_index(leaf, ref); in btrfs_del_inode_ref()
[all …]
Ddelayed-ref.h211 static inline void btrfs_put_delayed_ref(struct btrfs_delayed_ref_node *ref) in btrfs_put_delayed_ref() argument
213 WARN_ON(refcount_read(&ref->refs) == 0); in btrfs_put_delayed_ref()
214 if (refcount_dec_and_test(&ref->refs)) { in btrfs_put_delayed_ref()
215 WARN_ON(ref->in_tree); in btrfs_put_delayed_ref()
216 switch (ref->type) { in btrfs_put_delayed_ref()
219 kmem_cache_free(btrfs_delayed_tree_ref_cachep, ref); in btrfs_put_delayed_ref()
223 kmem_cache_free(btrfs_delayed_data_ref_cachep, ref); in btrfs_put_delayed_ref()
Droot-tree.c352 struct btrfs_root_ref *ref; in btrfs_del_root_ref() local
371 ref = btrfs_item_ptr(leaf, path->slots[0], in btrfs_del_root_ref()
373 ptr = (unsigned long)(ref + 1); in btrfs_del_root_ref()
374 if ((btrfs_root_ref_dirid(leaf, ref) != dirid) || in btrfs_del_root_ref()
375 (btrfs_root_ref_name_len(leaf, ref) != name_len) || in btrfs_del_root_ref()
380 *sequence = btrfs_root_ref_sequence(leaf, ref); in btrfs_del_root_ref()
426 struct btrfs_root_ref *ref; in btrfs_add_root_ref() local
439 sizeof(*ref) + name_len); in btrfs_add_root_ref()
447 ref = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_root_ref); in btrfs_add_root_ref()
448 btrfs_set_root_ref_dirid(leaf, ref, dirid); in btrfs_add_root_ref()
[all …]
/linux-4.19.296/drivers/xen/
Dgrant-table.c118 void (*update_entry)(grant_ref_t ref, domid_t domid,
128 int (*end_foreign_access_ref)(grant_ref_t ref, int readonly);
136 unsigned long (*end_foreign_transfer_ref)(grant_ref_t ref);
140 unsigned long (*read_frame)(grant_ref_t ref);
170 int ref, rc = 0; in get_free_entries() local
181 ref = head = gnttab_free_head; in get_free_entries()
190 return ref; in get_free_entries()
219 static void put_free_entry(grant_ref_t ref) in put_free_entry() argument
223 gnttab_entry(ref) = gnttab_free_head; in put_free_entry()
224 gnttab_free_head = ref; in put_free_entry()
[all …]
/linux-4.19.296/drivers/misc/lkdtm/
Drefcount.c17 static void overflow_check(refcount_t *ref) in overflow_check() argument
19 switch (refcount_read(ref)) { in overflow_check()
27 pr_err("Fail: refcount wrapped to %d\n", refcount_read(ref)); in overflow_check()
92 static void check_zero(refcount_t *ref) in check_zero() argument
94 switch (refcount_read(ref)) { in check_zero()
105 pr_err("Fail: refcount went crazy: %d\n", refcount_read(ref)); in check_zero()
127 static void check_negative(refcount_t *ref, int start) in check_negative() argument
134 if (refcount_read(ref) == start) { in check_negative()
140 switch (refcount_read(ref)) { in check_negative()
148 pr_err("Fail: refcount went crazy: %d\n", refcount_read(ref)); in check_negative()
[all …]
/linux-4.19.296/include/xen/
Dgrant_table.h93 int gnttab_end_foreign_access_ref(grant_ref_t ref, int readonly);
110 void gnttab_end_foreign_access(grant_ref_t ref, int readonly,
119 int gnttab_try_end_foreign_access(grant_ref_t ref);
123 unsigned long gnttab_end_foreign_transfer_ref(grant_ref_t ref);
124 unsigned long gnttab_end_foreign_transfer(grant_ref_t ref);
131 void gnttab_free_grant_reference(grant_ref_t ref);
146 void gnttab_grant_foreign_access_ref(grant_ref_t ref, domid_t domid,
151 grant_ref_t ref, domid_t domid, in gnttab_page_grant_foreign_access_ref_one() argument
154 gnttab_grant_foreign_access_ref(ref, domid, xen_page_to_gfn(page), in gnttab_page_grant_foreign_access_ref_one()
163 uint32_t flags, grant_ref_t ref, domid_t domid) in gnttab_set_map_op() argument
[all …]
/linux-4.19.296/drivers/misc/mic/host/
Dmic_smpt.c78 static void mic_add_smpt_entry(int spt, s64 *ref, u64 addr, in mic_add_smpt_entry() argument
91 smpt_info->entry[i].ref_count += ref[i - spt]; in mic_add_smpt_entry()
100 int entries, s64 *ref, size_t size) in mic_smpt_op() argument
138 mic_add_smpt_entry(spt, ref, dma_addr, entries, mdev); in mic_smpt_op()
151 size_t size, s64 *ref, u64 *smpt_start) in mic_get_smpt_ref_count() argument
158 ref[i++] = min(mic_smpt_align_high(mdev, start + 1), in mic_get_smpt_ref_count()
210 s64 *ref; in mic_map() local
216 ref = kmalloc_array(mdev->smpt->info.num_reg, sizeof(s64), GFP_ATOMIC); in mic_map()
217 if (!ref) in mic_map()
221 ref, &smpt_start); in mic_map()
[all …]
/linux-4.19.296/fs/orangefs/
Dinode.c355 static inline ino_t orangefs_handle_hash(struct orangefs_object_kref *ref) in orangefs_handle_hash() argument
357 if (!ref) in orangefs_handle_hash()
359 return orangefs_khandle_to_ino(&(ref->khandle)); in orangefs_handle_hash()
367 struct orangefs_object_kref *ref = (struct orangefs_object_kref *) data; in orangefs_set_inode() local
368 ORANGEFS_I(inode)->refn.fs_id = ref->fs_id; in orangefs_set_inode()
369 ORANGEFS_I(inode)->refn.khandle = ref->khandle; in orangefs_set_inode()
378 struct orangefs_object_kref *ref = (struct orangefs_object_kref *) data; in orangefs_test_inode() local
384 &(ref->khandle)) && in orangefs_test_inode()
385 orangefs_inode->refn.fs_id == ref->fs_id); in orangefs_test_inode()
396 struct orangefs_object_kref *ref) in orangefs_iget() argument
[all …]
/linux-4.19.296/fs/cifs/
Dcifs_dfs_ref.c139 const struct dfs_info3_param *ref, in cifs_compose_mount_options() argument
154 if (strlen(fullpath) - ref->path_consumed) { in cifs_compose_mount_options()
155 prepath = fullpath + ref->path_consumed; in cifs_compose_mount_options()
161 *devname = cifs_build_devname(ref->node_name, prepath); in cifs_compose_mount_options()
250 const char *fullpath, const struct dfs_info3_param *ref) in cifs_dfs_do_refmount() argument
258 fullpath + 1, ref, &devname); in cifs_dfs_do_refmount()
270 static void dump_referral(const struct dfs_info3_param *ref) in dump_referral() argument
272 cifs_dbg(FYI, "DFS: ref path: %s\n", ref->path_name); in dump_referral()
273 cifs_dbg(FYI, "DFS: node path: %s\n", ref->node_name); in dump_referral()
275 ref->flags, ref->server_type); in dump_referral()
[all …]
/linux-4.19.296/fs/ubifs/
Dlog.c180 struct ubifs_ref_node *ref; in ubifs_add_bud_to_log() local
185 ref = kzalloc(c->ref_node_alsz, GFP_NOFS); in ubifs_add_bud_to_log()
186 if (!ref) { in ubifs_add_bud_to_log()
240 ref->ch.node_type = UBIFS_REF_NODE; in ubifs_add_bud_to_log()
241 ref->lnum = cpu_to_le32(bud->lnum); in ubifs_add_bud_to_log()
242 ref->offs = cpu_to_le32(bud->start); in ubifs_add_bud_to_log()
243 ref->jhead = cpu_to_le32(jhead); in ubifs_add_bud_to_log()
273 err = ubifs_write_node(c, ref, UBIFS_REF_NODE_SZ, c->lhead_lnum, in ubifs_add_bud_to_log()
283 kfree(ref); in ubifs_add_bud_to_log()
288 kfree(ref); in ubifs_add_bud_to_log()
[all …]
/linux-4.19.296/drivers/iio/adc/
Dti-adc081c.c35 struct regulator *ref; member
66 err = regulator_get_voltage(adc->ref); in adc081c_read_raw()
184 adc->ref = devm_regulator_get(&client->dev, "vref"); in adc081c_probe()
185 if (IS_ERR(adc->ref)) in adc081c_probe()
186 return PTR_ERR(adc->ref); in adc081c_probe()
188 err = regulator_enable(adc->ref); in adc081c_probe()
218 regulator_disable(adc->ref); in adc081c_probe()
230 regulator_disable(adc->ref); in adc081c_remove()
Dti-adc161s626.c68 struct regulator *ref; member
151 ret = regulator_get_voltage(data->ref); in ti_adc_read_raw()
206 data->ref = devm_regulator_get(&spi->dev, "vdda"); in ti_adc_probe()
207 if (!IS_ERR(data->ref)) { in ti_adc_probe()
208 ret = regulator_enable(data->ref); in ti_adc_probe()
228 regulator_disable(data->ref); in ti_adc_probe()
240 regulator_disable(data->ref); in ti_adc_remove()

1234567