| /fs/bcachefs/ |
| A D | enumerated_ref.c | 42 if (ref->stop_fn) in enumerated_ref_put() 43 ref->stop_fn(ref); in enumerated_ref_put() 55 ref->stop_fn(ref); in enumerated_ref_kill_cb() 65 percpu_ref_kill(&ref->ref); in enumerated_ref_stop_async() 91 percpu_ref_reinit(&ref->ref); in enumerated_ref_start() 104 percpu_ref_exit(&ref->ref); in enumerated_ref_exit() 108 ref->nr = 0; in enumerated_ref_exit() 119 return percpu_ref_init(&ref->ref, enumerated_ref_kill_cb, in enumerated_ref_init() 122 ref->refs = kzalloc(sizeof(ref->refs[0]) * nr, GFP_KERNEL); in enumerated_ref_init() 123 if (!ref->refs) in enumerated_ref_init() [all …]
|
| A D | enumerated_ref.h | 20 static inline void enumerated_ref_get(struct enumerated_ref *ref, unsigned idx) in enumerated_ref_get() argument 22 percpu_ref_get(&ref->ref); in enumerated_ref_get() 27 return percpu_ref_tryget(&ref->ref); in __enumerated_ref_tryget() 30 static inline bool enumerated_ref_tryget(struct enumerated_ref *ref, unsigned idx) in enumerated_ref_tryget() argument 32 return percpu_ref_tryget_live(&ref->ref); in enumerated_ref_tryget() 35 static inline void enumerated_ref_put(struct enumerated_ref *ref, unsigned idx) in enumerated_ref_put() argument 37 percpu_ref_put(&ref->ref); in enumerated_ref_put() 41 static inline bool enumerated_ref_is_zero(struct enumerated_ref *ref) in enumerated_ref_is_zero() argument 44 return percpu_ref_is_zero(&ref->ref); in enumerated_ref_is_zero() 46 for (unsigned i = 0; i < ref->nr; i++) in enumerated_ref_is_zero() [all …]
|
| A D | ec.h | 205 atomic_t ref[STRIPE_REF_NR]; member 268 enum ec_stripe_ref ref) in ec_stripe_new_get() argument 270 atomic_inc(&s->ref[ref]); in ec_stripe_new_get() 274 enum ec_stripe_ref ref) in ec_stripe_new_put() argument 276 BUG_ON(atomic_read(&s->ref[ref]) <= 0); in ec_stripe_new_put() 278 if (atomic_dec_and_test(&s->ref[ref])) in ec_stripe_new_put() 279 switch (ref) { in ec_stripe_new_put()
|
| /fs/jffs2/ |
| A D | xattr.c | 591 ref->ino, ref->xid, ref->xseqno); in delete_xattr_ref() 606 for (ref = ic->xref; ref; ref = _ref) { in jffs2_xattr_delete_inode() 621 for (ref = ic->xref; ref; ref = _ref) { in jffs2_xattr_free_inode() 648 for (ref=ic->xref, pref=&ic->xref; ref; pref=&ref->next, ref=ref->next) { in check_xattr_ref_inode() 746 for (ref=c->xref_temp; ref; ref = _ref) { in jffs2_clear_xattr_subsystem() 793 for (ref=c->xref_temp; ref; ref=_ref) { in jffs2_build_xattr_subsystem() 833 for (ref=xref_tmphash[i]; ref; ref=_ref) { in jffs2_build_xattr_subsystem() 848 ref->ino, ref->xid, ref->xseqno); in jffs2_build_xattr_subsystem() 985 for (ref=ic->xref, pref=&ic->xref; ref; pref=&ref->next, ref=ref->next) { in jffs2_listxattr() 1051 for (ref=ic->xref, pref=&ic->xref; ref; pref=&ref->next, ref=ref->next) { in do_jffs2_getxattr() [all …]
|
| A D | malloc.c | 194 ref = *p; in jffs2_prealloc_raw_node_refs() 199 if (ref && ref->flash_offset != REF_EMPTY_NODE) in jffs2_prealloc_raw_node_refs() 200 ref++; in jffs2_prealloc_raw_node_refs() 203 if (!ref) { in jffs2_prealloc_raw_node_refs() 206 if (!ref) in jffs2_prealloc_raw_node_refs() 210 p = &ref->next_in_ino; in jffs2_prealloc_raw_node_refs() 211 ref = *p; in jffs2_prealloc_raw_node_refs() 215 ref++; in jffs2_prealloc_raw_node_refs() 286 if (!ref) in jffs2_alloc_xattr_ref() 290 ref->node = (void *)ref; in jffs2_alloc_xattr_ref() [all …]
|
| A D | nodelist.c | 597 dbg_noderef("Last node at %p is (%08x,%p)\n", ref, ref->flash_offset, in jffs2_link_node_ref() 602 ref = ref->next_in_ino; in jffs2_link_node_ref() 604 ref++; in jffs2_link_node_ref() 608 ref->flash_offset, ofs, ref->next_in_ino, len); in jffs2_link_node_ref() 619 ref, ref_offset(ref), ref_offset(ref)+len, in jffs2_link_node_ref() 628 ic->nodes = ref; in jffs2_link_node_ref() 658 return ref; in jffs2_link_node_ref() 708 ref, ref_offset(ref), jeb->last_node, in __ref_totlen() 731 ref, ref_offset(ref), ref_offset(ref) + ref->__totlen, in __jffs2_ref_totlen() 735 ref_next(ref), ref_offset(ref_next(ref)), in __jffs2_ref_totlen() [all …]
|
| A D | readinode.c | 570 while (ref && ref->next_in_ino) { in jffs2_first_valid_node() 571 if (!ref_obsolete(ref)) in jffs2_first_valid_node() 572 return ref; in jffs2_first_valid_node() 574 ref = ref->next_in_ino; in jffs2_first_valid_node() 594 BUG_ON(ref_obsolete(ref)); in read_direntry() 625 ref->flash_offset = ref_offset(ref) | dirent_node_state(rd); in read_direntry() 633 fd->raw = ref; in read_direntry() 827 ref->flash_offset = ref_offset(ref) | REF_NORMAL; in read_dnode() 843 tn->fn->raw = ref; in read_dnode() 893 ref_offset(ref)); in read_unknown() [all …]
|
| A D | nodemgmt.c | 595 if(unlikely(!ref)) { in jffs2_mark_node_obsolete() 599 if (ref_obsolete(ref)) { in jffs2_mark_node_obsolete() 607 ref->flash_offset); in jffs2_mark_node_obsolete() 680 ref->flash_offset = ref_offset(ref) | REF_OBSOLETE; in jffs2_mark_node_obsolete() 764 ref_offset(ref)); in jffs2_mark_node_obsolete() 768 ref_offset(ref), ret); in jffs2_mark_node_obsolete() 773 ref_offset(ref), retlen); in jffs2_mark_node_obsolete() 791 ref_offset(ref), ret); in jffs2_mark_node_obsolete() 810 if (ref->next_in_ino) { in jffs2_mark_node_obsolete() 820 *p = ref->next_in_ino; in jffs2_mark_node_obsolete() [all …]
|
| A D | nodelist.h | 103 ref++; 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 138 #define ref_obsolete(ref) (((ref)->flash_offset & 3) == REF_OBSOLETE) argument 139 #define mark_ref_normal(ref) do { (ref)->flash_offset = ref_offset(ref) | REF_NORMAL; } while(0) argument [all …]
|
| A D | erase.c | 212 prev = &ref->next_in_ino; in jffs2_remove_node_refs_from_ino_list() 233 if (this == ref) in jffs2_remove_node_refs_from_ino_list() 289 struct jffs2_raw_node_ref *block, *ref; in jffs2_free_jeb_node_refs() local 293 block = ref = jeb->first_node; in jffs2_free_jeb_node_refs() 295 while (ref) { in jffs2_free_jeb_node_refs() 296 if (ref->flash_offset == REF_LINK_NODE) { in jffs2_free_jeb_node_refs() 297 ref = ref->next_in_ino; in jffs2_free_jeb_node_refs() 299 block = ref; in jffs2_free_jeb_node_refs() 302 if (ref->flash_offset != REF_EMPTY_NODE && ref->next_in_ino) in jffs2_free_jeb_node_refs() 303 jffs2_remove_node_refs_from_ino_list(c, ref, jeb); in jffs2_free_jeb_node_refs() [all …]
|
| /fs/smb/client/ |
| A D | dfs.h | 65 kfree(ref->path); in __ref_walk_free() 68 if (ref->ses) in __ref_walk_free() 70 memset(ref, 0, sizeof(*ref)); in __ref_walk_free() 80 for (ref = ref_walk_start(rw); ref <= ref_walk_end(rw); ref++) in ref_walk_free() 105 if (!ref->tit) in ref_walk_next_tgt() 108 tit = dfs_cache_get_next_tgt(&ref->tl, ref->tit); in ref_walk_next_tgt() 114 ref->tit = tit; in ref_walk_next_tgt() 115 return ref->tit; in ref_walk_next_tgt() 137 for (; ref <= ref_walk_cur(rw); ref++) { in ref_walk_set_tcon() 141 ref->ses = NULL; in ref_walk_set_tcon() [all …]
|
| A D | dfs_cache.c | 268 ref->flags, ref->path_consumed, ref->server_type, in dump_refs() 269 ref->ref_flag, ref->path_name, ref->node_name, in dump_refs() 270 ref->ttl, ref->ttl / 60); in dump_refs() 761 memset(ref, 0, sizeof(*ref)); in setup_referral() 764 if (!ref->path_name) in setup_referral() 768 if (!ref->node_name) { in setup_referral() 774 ref->ttl = ce->ttl; in setup_referral() 782 kfree(ref->path_name); in setup_referral() 872 if (ref) in dfs_cache_find() 918 if (ref) in dfs_cache_noreq_find() [all …]
|
| A D | dfs.c | 23 int dfs_parse_target_referral(const char *full_path, const struct dfs_info3_param *ref, in dfs_parse_target_referral() argument 30 if (!full_path || !*full_path || !ref || !ctx) in dfs_parse_target_referral() 33 if (WARN_ON_ONCE(!ref->node_name || ref->path_consumed < 0)) in dfs_parse_target_referral() 36 if (strlen(full_path) - ref->path_consumed) { in dfs_parse_target_referral() 37 prepath = full_path + ref->path_consumed; in dfs_parse_target_referral() 43 path = cifs_build_devname(ref->node_name, prepath); in dfs_parse_target_referral() 394 struct dfs_info3_param ref = {0}; in cifs_tree_connect() local 439 dfs_cache_noreq_find(server->leaf_fullpath + 1, &ref, &tl)) { in cifs_tree_connect() 445 rc = tree_connect_dfs_target(xid, tcon, cifs_sb, tree, ref.server_type == DFS_TYPE_LINK, in cifs_tree_connect() 447 free_dfs_info_param(&ref); in cifs_tree_connect()
|
| /fs/btrfs/ |
| A D | ref-verify.c | 233 kfree(ref); in free_block_entry() 302 if (!ref) in add_tree_block() 316 kfree(ref); in add_tree_block() 332 kfree(ref); in add_tree_block() 347 if (!ref) in add_shared_data_ref() 351 kfree(ref); in add_shared_data_ref() 382 if (!ref) in add_extent_data_ref() 605 ra->ref.owner, ra->ref.offset, ra->ref.num_refs); in dump_ref_action() 630 ref->root_objectid, ref->parent, ref->owner, in dump_block_entry() 631 ref->offset, ref->num_refs); in dump_block_entry() [all …]
|
| A D | delayed-ref.c | 379 list_del(&ref->add_list); in drop_delayed_ref() 380 btrfs_put_delayed_ref(ref); in drop_delayed_ref() 408 swap(ref, next); in merge_ref() 415 ref->ref_mod += mod; in merge_ref() 416 if (ref->ref_mod == 0) { in merge_ref() 572 return ref; in btrfs_select_delayed_ref() 602 mod = ref->ref_mod; in insert_delayed_ref() 619 mod = -ref->ref_mod; in insert_delayed_ref() 937 ref->ref_mod = 1; in init_delayed_ref_common() 938 ref->action = action; in init_delayed_ref_common() [all …]
|
| A D | inode-item.c | 21 struct btrfs_inode_ref *ref; in btrfs_find_name_in_backref() local 33 name_ptr = (unsigned long)(ref + 1); in btrfs_find_name_in_backref() 34 cur_offset += len + sizeof(*ref); in btrfs_find_name_in_backref() 39 return ref; in btrfs_find_name_in_backref() 172 struct btrfs_inode_ref *ref; in btrfs_del_inode_ref() local 200 if (!ref) { in btrfs_del_inode_ref() 215 ptr = (unsigned long)ref; in btrfs_del_inode_ref() 302 struct btrfs_inode_ref *ref; in btrfs_insert_inode_ref() local 322 if (ref) in btrfs_insert_inode_ref() 329 ref = (struct btrfs_inode_ref *)((unsigned long)ref + old_size); in btrfs_insert_inode_ref() [all …]
|
| A D | backref.c | 342 free_pref(ref); in prelim_release() 399 if (!ref) in add_prelim_ref() 406 memset(&ref->key_for_search, 0, sizeof(ref->key_for_search)); in add_prelim_ref() 670 ref->root_id, level, ref->count, ret, in resolve_indirect_ref() 671 ref->key_for_search.objectid, ref->key_for_search.type, in resolve_indirect_ref() 767 free_pref(ref); in resolve_indirect_refs() 772 free_pref(ref); in resolve_indirect_refs() 786 free_pref(ref); in resolve_indirect_refs() 808 memcpy(new_ref, ref, sizeof(*ref)); in resolve_indirect_refs() 1597 if (ctx->roots && ref->count && ref->root_id && ref->parent == 0) { in find_parent_nodes() [all …]
|
| A D | root-tree.c | 348 struct btrfs_root_ref *ref; in btrfs_del_root_ref() local 367 ref = btrfs_item_ptr(leaf, path->slots[0], in btrfs_del_root_ref() 369 ptr = (unsigned long)(ref + 1); in btrfs_del_root_ref() 370 if ((btrfs_root_ref_dirid(leaf, ref) != dirid) || in btrfs_del_root_ref() 376 *sequence = btrfs_root_ref_sequence(leaf, ref); in btrfs_del_root_ref() 422 struct btrfs_root_ref *ref; in btrfs_add_root_ref() local 435 sizeof(*ref) + name->len); in btrfs_add_root_ref() 444 btrfs_set_root_ref_dirid(leaf, ref, dirid); in btrfs_add_root_ref() 445 btrfs_set_root_ref_sequence(leaf, ref, sequence); in btrfs_add_root_ref() 446 btrfs_set_root_ref_name_len(leaf, ref, name->len); in btrfs_add_root_ref() [all …]
|
| /fs/btrfs/tests/ |
| A D | delayed-refs-tests.c | 175 struct btrfs_ref ref = { in simple_test() local 185 if (ref.type == BTRFS_REF_METADATA) in simple_test() 192 if (ref.type == BTRFS_REF_METADATA) in simple_test() 343 struct btrfs_ref ref = { in merge_tests() local 433 ref.action = BTRFS_ADD_DELAYED_REF; in merge_tests() 560 ref.action = BTRFS_ADD_DELAYED_REF; in merge_tests() 642 ref.action = BTRFS_ADD_DELAYED_REF; in merge_tests() 706 ref.parent = 0; in merge_tests() 724 ref.parent = 0; in merge_tests() 784 struct btrfs_ref ref = { in select_delayed_refs_test() local [all …]
|
| /fs/nfs/ |
| A D | nfs42xattr.c | 69 struct kref ref; member 80 struct kref ref; member 235 kref_init(&entry->ref); in nfs4_xattr_alloc_entry() 296 kref_init(&cache->ref); in nfs4_xattr_alloc_cache() 443 kref_get(&cache->ref); in nfs4_xattr_get_cache() 472 kref_get(&newcache->ref); in nfs4_xattr_get_cache() 474 kref_get(&cache->ref); in nfs4_xattr_get_cache() 598 kref_get(&entry->ref); in nfs4_xattr_hash_find() 825 kref_get(&cache->ref); in cache_lru_isolate() 895 kref_get(&entry->ref); in entry_lru_isolate() [all …]
|
| /fs/netfs/ |
| A D | fscache_volume.c | 23 int ref; in fscache_get_volume() local 25 __refcount_inc(&volume->ref, &ref); in fscache_get_volume() 33 int ref; in fscache_try_get_volume() local 35 if (!__refcount_inc_not_zero(&volume->ref, &ref)) in fscache_try_get_volume() 46 int ref = refcount_read(&volume->ref); in fscache_see_volume() local 63 refcount_read(&volume->ref), in __fscache_begin_volume_access() 128 refcount_read(&volume->ref), in fscache_end_volume_access() 244 refcount_set(&volume->ref, 1); in fscache_alloc_volume() 427 int ref; in fscache_put_volume() local 429 zero = __refcount_dec_and_test(&volume->ref, &ref); in fscache_put_volume() [all …]
|
| A D | fscache_cache.c | 37 refcount_set(&cache->ref, 1); in fscache_alloc_cache() 48 int ref; in fscache_get_cache_maybe() local 50 success = __refcount_inc_not_zero(&cache->ref, &ref); in fscache_get_cache_maybe() 52 trace_fscache_cache(cache->debug_id, ref + 1, where); in fscache_get_cache_maybe() 119 refcount_read(&candidate->ref), in fscache_lookup_cache() 184 int ref; in fscache_put_cache() local 190 zero = __refcount_dec_and_test(&cache->ref, &ref); in fscache_put_cache() 191 trace_fscache_cache(debug_id, ref - 1, where); in fscache_put_cache() 249 trace_fscache_access_cache(cache->debug_id, refcount_read(&cache->ref), in fscache_add_cache() 298 trace_fscache_access_cache(cache->debug_id, refcount_read(&cache->ref), in fscache_begin_cache_access() [all …]
|
| /fs/ubifs/ |
| A D | log.c | 168 struct ubifs_ref_node *ref; in ubifs_add_bud_to_log() local 174 if (!ref) { in ubifs_add_bud_to_log() 229 ref->ch.node_type = UBIFS_REF_NODE; in ubifs_add_bud_to_log() 232 ref->jhead = cpu_to_le32(jhead); in ubifs_add_bud_to_log() 280 kfree(ref); in ubifs_add_bud_to_log() 285 kfree(ref); in ubifs_add_bud_to_log() 360 struct ubifs_ref_node *ref; in ubifs_log_start_commit() local 402 ref = buf + len; in ubifs_log_start_commit() 404 ref->lnum = cpu_to_le32(lnum); in ubifs_log_start_commit() 405 ref->offs = cpu_to_le32(offs); in ubifs_log_start_commit() [all …]
|
| /fs/ntfs3/ |
| A D | super.c | 832 struct MFT_REF ref; in ntfs_export_get_inode() local 835 ref.low = cpu_to_le32(ino); in ntfs_export_get_inode() 837 ref.high = cpu_to_le16(ino >> 32); in ntfs_export_get_inode() 839 ref.high = 0; in ntfs_export_get_inode() 841 ref.seq = cpu_to_le16(generation); in ntfs_export_get_inode() 843 inode = ntfs_iget5(sb, &ref, NULL); in ntfs_export_get_inode() 1211 struct MFT_REF ref; in ntfs_fill_super() local 1215 ref.high = 0; in ntfs_fill_super() 1253 ref.low = cpu_to_le32(MFT_REC_VOL); in ntfs_fill_super() 1254 ref.seq = cpu_to_le16(MFT_REC_VOL); in ntfs_fill_super() [all …]
|
| /fs/erofs/ |
| A D | fscache.c | 33 refcount_t ref; member 42 refcount_t ref; member 93 refcount_set(&req->ref, 1); in erofs_fscache_req_alloc() 123 refcount_inc(&req->ref); in erofs_fscache_req_io_alloc() 124 refcount_set(&io->ref, 1); in erofs_fscache_req_io_alloc() 158 refcount_inc(&io->ref); in erofs_fscache_read_io_async() 201 refcount_set(&io->io.ref, 1); in erofs_fscache_bio_alloc() 478 refcount_inc(&domain->ref); in erofs_fscache_register_domain() 502 refcount_set(&ctx->ref, 1); in erofs_fscache_acquire_cookie() 568 refcount_inc(&domain->ref); in erofs_domain_init_cookie() [all …]
|