/fs/jffs2/ |
D | xattr.c | 444 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 …]
|
D | malloc.c | 204 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 …]
|
D | nodelist.c | 590 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 …]
|
D | readinode.c | 33 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 …]
|
D | nodemgmt.c | 579 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 …]
|
D | nodelist.h | 101 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 …]
|
D | erase.c | 207 struct jffs2_raw_node_ref *ref, struct jffs2_eraseblock *jeb) in jffs2_remove_node_refs_from_ino_list() argument 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() [all …]
|
/fs/btrfs/ |
D | ref-verify.c | 51 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() 235 struct ref_entry *ref; in free_block_entry() local 246 ref = rb_entry(n, struct ref_entry, node); in free_block_entry() 247 rb_erase(&ref->node, &be->refs); in free_block_entry() 248 kfree(ref); in free_block_entry() 314 struct ref_entry *ref = NULL, *exist; in add_tree_block() local [all …]
|
D | delayed-ref.c | 435 struct btrfs_delayed_ref_node *ref) in drop_delayed_ref() argument 438 rb_erase_cached(&ref->ref_node, &head->ref_tree); in drop_delayed_ref() 439 RB_CLEAR_NODE(&ref->ref_node); in drop_delayed_ref() 440 if (!list_empty(&ref->add_list)) in drop_delayed_ref() 441 list_del(&ref->add_list); in drop_delayed_ref() 442 ref->in_tree = 0; in drop_delayed_ref() 443 btrfs_put_delayed_ref(ref); in drop_delayed_ref() 450 struct btrfs_delayed_ref_node *ref, in merge_ref() argument 454 struct rb_node *node = rb_next(&ref->ref_node); in merge_ref() 464 if (comp_refs(ref, next, false)) in merge_ref() [all …]
|
D | backref.c | 168 static void free_pref(struct prelim_ref *ref) in free_pref() argument 170 kmem_cache_free(btrfs_prelim_ref_cache, ref); in free_pref() 234 struct prelim_ref *ref; in prelim_ref_insert() local 243 ref = rb_entry(parent, struct prelim_ref, rbnode); in prelim_ref_insert() 244 result = prelim_ref_compare(ref, newref); in prelim_ref_insert() 252 struct extent_inode_elem *eie = ref->inode_list; in prelim_ref_insert() 258 ref->inode_list = newref->inode_list; in prelim_ref_insert() 261 trace_btrfs_prelim_ref_merge(fs_info, ref, newref, in prelim_ref_insert() 268 update_share_count(sc, ref->count, in prelim_ref_insert() 269 ref->count + newref->count); in prelim_ref_insert() [all …]
|
D | inode-item.c | 16 struct btrfs_inode_ref *ref; in btrfs_find_name_in_backref() local 26 ref = (struct btrfs_inode_ref *)(ptr + cur_offset); in btrfs_find_name_in_backref() 27 len = btrfs_inode_ref_name_len(leaf, ref); in btrfs_find_name_in_backref() 28 name_ptr = (unsigned long)(ref + 1); in btrfs_find_name_in_backref() 29 cur_offset += len + sizeof(*ref); in btrfs_find_name_in_backref() 34 return ref; in btrfs_find_name_in_backref() 178 struct btrfs_inode_ref *ref; in btrfs_del_inode_ref() local 186 int del_len = name->len + sizeof(*ref); in btrfs_del_inode_ref() 205 ref = btrfs_find_name_in_backref(path->nodes[0], path->slots[0], name); in btrfs_del_inode_ref() 206 if (!ref) { in btrfs_del_inode_ref() [all …]
|
D | root-tree.c | 335 struct btrfs_root_ref *ref; in btrfs_del_root_ref() local 354 ref = btrfs_item_ptr(leaf, path->slots[0], in btrfs_del_root_ref() 356 ptr = (unsigned long)(ref + 1); in btrfs_del_root_ref() 357 if ((btrfs_root_ref_dirid(leaf, ref) != dirid) || in btrfs_del_root_ref() 358 (btrfs_root_ref_name_len(leaf, ref) != name->len) || in btrfs_del_root_ref() 363 *sequence = btrfs_root_ref_sequence(leaf, ref); in btrfs_del_root_ref() 409 struct btrfs_root_ref *ref; in btrfs_add_root_ref() local 422 sizeof(*ref) + name->len); in btrfs_add_root_ref() 430 ref = btrfs_item_ptr(leaf, path->slots[0], struct btrfs_root_ref); in btrfs_add_root_ref() 431 btrfs_set_root_ref_dirid(leaf, ref, dirid); in btrfs_add_root_ref() [all …]
|
D | extent-tree.c | 425 struct btrfs_extent_data_ref *ref) in hash_extent_data_ref_item() argument 427 return hash_extent_data_ref(btrfs_extent_data_ref_root(leaf, ref), in hash_extent_data_ref_item() 428 btrfs_extent_data_ref_objectid(leaf, ref), in hash_extent_data_ref_item() 429 btrfs_extent_data_ref_offset(leaf, ref)); in hash_extent_data_ref_item() 433 struct btrfs_extent_data_ref *ref, in match_extent_data_ref() argument 436 if (btrfs_extent_data_ref_root(leaf, ref) != root_objectid || in match_extent_data_ref() 437 btrfs_extent_data_ref_objectid(leaf, ref) != owner || in match_extent_data_ref() 438 btrfs_extent_data_ref_offset(leaf, ref) != offset) in match_extent_data_ref() 451 struct btrfs_extent_data_ref *ref; in lookup_extent_data_ref() local 501 ref = btrfs_item_ptr(leaf, path->slots[0], in lookup_extent_data_ref() [all …]
|
D | delayed-ref.h | 315 static inline void btrfs_put_delayed_ref(struct btrfs_delayed_ref_node *ref) in btrfs_put_delayed_ref() argument 317 WARN_ON(refcount_read(&ref->refs) == 0); in btrfs_put_delayed_ref() 318 if (refcount_dec_and_test(&ref->refs)) { in btrfs_put_delayed_ref() 319 WARN_ON(ref->in_tree); in btrfs_put_delayed_ref() 320 switch (ref->type) { in btrfs_put_delayed_ref() 323 kmem_cache_free(btrfs_delayed_tree_ref_cachep, ref); in btrfs_put_delayed_ref() 327 kmem_cache_free(btrfs_delayed_data_ref_cachep, ref); in btrfs_put_delayed_ref()
|
/fs/nfs/ |
D | nfs42xattr.c | 69 struct kref ref; member 80 struct kref ref; member 235 kref_init(&entry->ref); in nfs4_xattr_alloc_entry() 259 entry = container_of(kref, struct nfs4_xattr_entry, ref); in nfs4_xattr_free_entry_cb() 273 cache = container_of(kref, struct nfs4_xattr_cache, ref); in nfs4_xattr_free_cache_cb() 296 kref_init(&cache->ref); in nfs4_xattr_alloc_cache() 330 kref_put(&old->ref, nfs4_xattr_free_entry_cb); in nfs4_xattr_set_listcache() 401 kref_put(&entry->ref, nfs4_xattr_free_entry_cb); in nfs4_xattr_discard_cache() 408 kref_put(&cache->ref, nfs4_xattr_free_cache_cb); in nfs4_xattr_discard_cache() 443 kref_get(&cache->ref); in nfs4_xattr_get_cache() [all …]
|
D | pnfs_dev.c | 88 if (atomic_read(&d->ref)) in _lookup_deviceid() 181 if (d != NULL && !atomic_inc_not_zero(&d->ref)) in __nfs4_find_get_deviceid() 211 atomic_inc(&new->ref); in nfs4_find_get_deviceid() 263 atomic_set(&d->ref, 1); in nfs4_init_deviceid_node() 281 if (atomic_add_unless(&d->ref, -1, 2)) in nfs4_put_deviceid_node() 285 if (!atomic_dec_and_test(&d->ref)) in nfs4_put_deviceid_node() 339 if (d->nfs_client == clp && atomic_read(&d->ref)) { in _deviceid_purge_client()
|
/fs/fscache/ |
D | 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 …]
|
D | volume.c | 23 int ref; in fscache_get_volume() local 25 __refcount_inc(&volume->ref, &ref); in fscache_get_volume() 26 trace_fscache_volume(volume->debug_id, ref + 1, where); in fscache_get_volume() 33 int ref = refcount_read(&volume->ref); in fscache_see_volume() local 35 trace_fscache_volume(volume->debug_id, ref, where); in fscache_see_volume() 50 refcount_read(&volume->ref), in __fscache_begin_volume_access() 115 refcount_read(&volume->ref), in fscache_end_volume_access() 231 refcount_set(&volume->ref, 1); in fscache_alloc_volume() 415 int ref; in fscache_put_volume() local 417 zero = __refcount_dec_and_test(&volume->ref, &ref); in fscache_put_volume() [all …]
|
D | cookie.c | 106 trace_fscache_access(cookie->debug_id, refcount_read(&cookie->ref), in fscache_init_access_gate() 128 trace_fscache_access(cookie->debug_id, refcount_read(&cookie->ref), in fscache_end_cookie_access() 148 trace_fscache_access(cookie->debug_id, refcount_read(&cookie->ref), in __fscache_begin_cookie_access() 266 trace_fscache_cookie(cookie->debug_id, refcount_read(&cookie->ref), in fscache_caching_failed() 359 refcount_set(&cookie->ref, 1); in fscache_alloc_cookie() 435 trace_fscache_cookie(cursor->debug_id, refcount_read(&cursor->ref), in fscache_hash_cookie() 584 trace_fscache_active(cookie->debug_id, refcount_read(&cookie->ref), in __fscache_use_cookie() 669 unsigned int r = refcount_read(&cookie->ref); in __fscache_unuse_cookie() 684 r = refcount_read(&cookie->ref); in __fscache_unuse_cookie() 850 trace_fscache_access(cookie->debug_id, refcount_read(&cookie->ref), in __fscache_withdraw_cookie() [all …]
|
/fs/ubifs/ |
D | log.c | 168 struct ubifs_ref_node *ref; in ubifs_add_bud_to_log() local 173 ref = kzalloc(c->ref_node_alsz, GFP_NOFS); in ubifs_add_bud_to_log() 174 if (!ref) { in ubifs_add_bud_to_log() 229 ref->ch.node_type = UBIFS_REF_NODE; in ubifs_add_bud_to_log() 230 ref->lnum = cpu_to_le32(bud->lnum); in ubifs_add_bud_to_log() 231 ref->offs = cpu_to_le32(bud->start); in ubifs_add_bud_to_log() 232 ref->jhead = cpu_to_le32(jhead); in ubifs_add_bud_to_log() 262 err = ubifs_write_node(c, ref, UBIFS_REF_NODE_SZ, c->lhead_lnum, in ubifs_add_bud_to_log() 267 err = ubifs_shash_update(c, c->log_hash, ref, UBIFS_REF_NODE_SZ); in ubifs_add_bud_to_log() 280 kfree(ref); in ubifs_add_bud_to_log() [all …]
|
/fs/ntfs3/ |
D | super.c | 607 struct MFT_REF ref; in ntfs_export_get_inode() local 610 ref.low = cpu_to_le32(ino); in ntfs_export_get_inode() 612 ref.high = cpu_to_le16(ino >> 32); in ntfs_export_get_inode() 614 ref.high = 0; in ntfs_export_get_inode() 616 ref.seq = cpu_to_le16(generation); in ntfs_export_get_inode() 618 inode = ntfs_iget5(sb, &ref, NULL); in ntfs_export_get_inode() 906 struct MFT_REF ref; in ntfs_fill_super() local 908 ref.high = 0; in ntfs_fill_super() 944 ref.low = cpu_to_le32(MFT_REC_VOL); in ntfs_fill_super() 945 ref.seq = cpu_to_le16(MFT_REC_VOL); in ntfs_fill_super() [all …]
|
/fs/smb/client/ |
D | dfs_cache.c | 368 const struct dfs_info3_param *ref = &refs[i]; in dump_refs() local 379 ref->flags, ref->path_consumed, ref->server_type, in dump_refs() 380 ref->ref_flag, ref->path_name, ref->node_name, in dump_refs() 381 ref->ttl, ref->ttl / 60); in dump_refs() 776 struct dfs_info3_param *ref = *refs; in get_dfs_referral() local 779 convert_delimiter(ref[i].path_name, '\\'); in get_dfs_referral() 849 struct dfs_info3_param *ref, const char *target) in setup_referral() argument 855 memset(ref, 0, sizeof(*ref)); in setup_referral() 857 ref->path_name = kstrdup(path, GFP_ATOMIC); in setup_referral() 858 if (!ref->path_name) in setup_referral() [all …]
|
D | cifs_dfs_ref.c | 137 const struct dfs_info3_param *ref, in cifs_compose_mount_options() argument 153 if (ref) { in cifs_compose_mount_options() 154 if (WARN_ON_ONCE(!ref->node_name || ref->path_consumed < 0)) in cifs_compose_mount_options() 157 if (strlen(fullpath) - ref->path_consumed) { in cifs_compose_mount_options() 158 prepath = fullpath + ref->path_consumed; in cifs_compose_mount_options() 164 name = cifs_build_devname(ref->node_name, prepath); in cifs_compose_mount_options()
|
/fs/netfs/ |
D | objects.c | 38 refcount_set(&rreq->ref, 1); in netfs_alloc_request() 56 __refcount_inc(&rreq->ref, &r); in netfs_get_request() 95 dead = __refcount_dec_and_test(&rreq->ref, &r); in netfs_put_request() 118 refcount_set(&subreq->ref, 2); in netfs_alloc_subrequest() 132 __refcount_inc(&subreq->ref, &r); in netfs_get_subrequest() 156 dead = __refcount_dec_and_test(&subreq->ref, &r); in netfs_put_subrequest()
|
/fs/orangefs/ |
D | namei.c | 26 struct orangefs_object_kref ref; in orangefs_create() local 61 ref = new_op->downcall.resp.create.refn; in orangefs_create() 63 inode = orangefs_new_inode(dir->i_sb, dir, S_IFREG | mode, 0, &ref); in orangefs_create() 226 struct orangefs_object_kref ref; in orangefs_symlink() local 269 ref = new_op->downcall.resp.sym.refn; in orangefs_symlink() 271 inode = orangefs_new_inode(dir->i_sb, dir, S_IFLNK | mode, 0, &ref); in orangefs_symlink() 313 struct orangefs_object_kref ref; in orangefs_mkdir() local 344 ref = new_op->downcall.resp.mkdir.refn; in orangefs_mkdir() 346 inode = orangefs_new_inode(dir->i_sb, dir, S_IFDIR | mode, 0, &ref); in orangefs_mkdir()
|