/fs/kernfs/ |
D | dir.c | 55 return strlcpy(buf, kn->parent ? kn->name : "/", buflen); in kernfs_name_locked() 63 while (to->parent && to != from) { in kernfs_depth() 65 to = to->parent; in kernfs_depth() 83 a = a->parent; in kernfs_common_ancestor() 87 b = b->parent; in kernfs_common_ancestor() 93 b = b->parent; in kernfs_common_ancestor() 94 a = a->parent; in kernfs_common_ancestor() 167 kn = kn->parent; in kernfs_path_from_node_locked() 289 struct kernfs_node *parent; in kernfs_get_parent() local 293 parent = kn->parent; in kernfs_get_parent() [all …]
|
D | symlink.c | 25 struct kernfs_node *kernfs_create_link(struct kernfs_node *parent, in kernfs_create_link() argument 39 kn = kernfs_new_node(parent, name, S_IFLNK|S_IRWXUGO, uid, gid, in kernfs_create_link() 44 if (kernfs_ns_enabled(parent)) in kernfs_create_link() 57 static int kernfs_get_target_path(struct kernfs_node *parent, in kernfs_get_target_path() argument 65 base = parent; in kernfs_get_target_path() 66 while (base->parent) { in kernfs_get_target_path() 67 kn = target->parent; in kernfs_get_target_path() 68 while (kn->parent && base != kn) in kernfs_get_target_path() 69 kn = kn->parent; in kernfs_get_target_path() 79 base = base->parent; in kernfs_get_target_path() [all …]
|
D | mount.c | 57 struct inode *parent) in kernfs_encode_fh() argument 106 struct kernfs_node *parent; in __kernfs_fh_to_dentry() local 108 parent = kernfs_get_parent(kn); in __kernfs_fh_to_dentry() 110 kn = parent; in __kernfs_fh_to_dentry() 141 return d_obtain_alias(kernfs_get_inode(child->d_sb, kn->parent)); in kernfs_get_parent_dentry() 174 struct kernfs_node *parent) in find_next_ancestor() argument 176 if (child == parent) { in find_next_ancestor() 181 while (child->parent != parent) { in find_next_ancestor() 182 if (!child->parent) in find_next_ancestor() 184 child = child->parent; in find_next_ancestor() [all …]
|
/fs/sysfs/ |
D | dir.c | 21 void sysfs_warn_dup(struct kernfs_node *parent, const char *name) in sysfs_warn_dup() argument 27 kernfs_path(parent, buf, PATH_MAX); in sysfs_warn_dup() 42 struct kernfs_node *parent, *kn; in sysfs_create_dir_ns() local 49 if (kobj->parent) in sysfs_create_dir_ns() 50 parent = kobj->parent->sd; in sysfs_create_dir_ns() 52 parent = sysfs_root_kn; in sysfs_create_dir_ns() 54 if (!parent) in sysfs_create_dir_ns() 59 kn = kernfs_create_dir_ns(parent, kobject_name(kobj), in sysfs_create_dir_ns() 64 sysfs_warn_dup(parent, kobject_name(kobj)); in sysfs_create_dir_ns() 109 struct kernfs_node *parent; in sysfs_rename_dir_ns() local [all …]
|
D | group.c | 20 static void remove_files(struct kernfs_node *parent, in remove_files() argument 28 kernfs_remove_by_name(parent, (*attr)->name); in remove_files() 31 kernfs_remove_by_name(parent, (*bin_attr)->attr.name); in remove_files() 34 static int create_files(struct kernfs_node *parent, struct kobject *kobj, in create_files() argument 52 kernfs_remove_by_name(parent, (*attr)->name); in create_files() 64 error = sysfs_add_file_mode_ns(parent, *attr, false, in create_files() 70 remove_files(parent, grp); in create_files() 80 kernfs_remove_by_name(parent, in create_files() 93 error = sysfs_add_file_mode_ns(parent, in create_files() 101 remove_files(parent, grp); in create_files() [all …]
|
D | symlink.c | 20 static int sysfs_do_create_link_sd(struct kernfs_node *parent, in sysfs_do_create_link_sd() argument 26 if (WARN_ON(!name || !parent)) in sysfs_do_create_link_sd() 44 kn = kernfs_create_link(parent, name, target); in sysfs_do_create_link_sd() 51 sysfs_warn_dup(parent, name); in sysfs_do_create_link_sd() 70 struct kernfs_node *parent = NULL; in sysfs_do_create_link() local 73 parent = sysfs_root_kn; in sysfs_do_create_link() 75 parent = kobj->sd; in sysfs_do_create_link() 77 if (!parent) in sysfs_do_create_link() 80 return sysfs_do_create_link_sd(parent, target, name, warn); in sysfs_do_create_link() 145 struct kernfs_node *parent = NULL; in sysfs_remove_link() local [all …]
|
D | file.c | 28 struct kobject *kobj = kn->parent->priv; in sysfs_file_ops() 43 struct kobject *kobj = of->kn->parent->priv; in sysfs_kf_seq_show() 84 struct kobject *kobj = of->kn->parent->priv; in sysfs_kf_bin_read() 108 struct kobject *kobj = of->kn->parent->priv; in sysfs_kf_read() 134 struct kobject *kobj = of->kn->parent->priv; in sysfs_kf_write() 147 struct kobject *kobj = of->kn->parent->priv; in sysfs_kf_bin_write() 168 struct kobject *kobj = of->kn->parent->priv; in sysfs_kf_bin_mmap() 246 int sysfs_add_file_mode_ns(struct kernfs_node *parent, in sysfs_add_file_mode_ns() argument 256 struct kobject *kobj = parent->priv; in sysfs_add_file_mode_ns() 306 kn = __kernfs_create_file(parent, attr->name, mode & 0777, uid, gid, in sysfs_add_file_mode_ns() [all …]
|
/fs/exportfs/ |
D | expfs.c | 78 struct dentry *parent = dget_parent(dentry); in dentry_connected() local 81 if (dentry == parent) { in dentry_connected() 82 dput(parent); in dentry_connected() 85 dentry = parent; in dentry_connected() 95 struct dentry *parent = dget_parent(dentry); in clear_disconnected() local 104 dentry = parent; in clear_disconnected() 124 struct dentry *parent; in reconnect_one() local 128 parent = ERR_PTR(-EACCES); in reconnect_one() 131 parent = mnt->mnt_sb->s_export_op->get_parent(dentry); in reconnect_one() 134 if (IS_ERR(parent)) { in reconnect_one() [all …]
|
/fs/proc/ |
D | generic.c | 94 struct rb_node **new = &root->rb_node, *parent = NULL; in pde_subdir_insert() local 103 parent = *new; in pde_subdir_insert() 113 rb_link_node(&de->subdir_node, parent, new); in pde_subdir_insert() 379 dp->parent = dir; in proc_register() 397 static struct proc_dir_entry *__proc_create(struct proc_dir_entry **parent, in __proc_create() argument 406 if (xlate_proc_name(name, parent, &fn) != 0) in __proc_create() 422 if (*parent == &proc_root && name_to_int(&qstr) != ~0U) { in __proc_create() 426 if (is_empty_pde(*parent)) { in __proc_create() 453 proc_set_user(ent, (*parent)->uid, (*parent)->gid); in __proc_create() 457 if ((*parent)->proc_dops == &proc_net_dentry_ops) in __proc_create() [all …]
|
D | proc_net.c | 34 return pde->parent->data; in PDE_NET() 105 struct proc_dir_entry *parent, const struct seq_operations *ops, in proc_create_net_data() argument 110 p = proc_create_reg(name, mode, &parent, data); in proc_create_net_data() 117 return proc_register(parent, p); in proc_create_net_data() 147 struct proc_dir_entry *parent, in proc_create_net_data_write() argument 154 p = proc_create_reg(name, mode, &parent, data); in proc_create_net_data_write() 162 return proc_register(parent, p); in proc_create_net_data_write() 198 struct proc_dir_entry *parent, in proc_create_net_single() argument 203 p = proc_create_reg(name, mode, &parent, data); in proc_create_net_single() 209 return proc_register(parent, p); in proc_create_net_single() [all …]
|
/fs/hfs/ |
D | brec.c | 147 if (!new_node->parent) { in hfs_brec_insert() 149 new_node->parent = tree->root; in hfs_brec_insert() 151 fd->bnode = hfs_bnode_find(tree, new_node->parent); in hfs_brec_insert() 180 struct hfs_bnode *node, *parent; in hfs_brec_remove() local 198 if (!node->parent) in hfs_brec_remove() 200 parent = hfs_bnode_find(tree, node->parent); in hfs_brec_remove() 201 if (IS_ERR(parent)) in hfs_brec_remove() 202 return PTR_ERR(parent); in hfs_brec_remove() 204 node = fd->bnode = parent; in hfs_brec_remove() 249 new_node->parent = node->parent; in hfs_bnode_split() [all …]
|
/fs/hfsplus/ |
D | brec.c | 147 if (!new_node->parent) { in hfs_brec_insert() 149 new_node->parent = tree->root; in hfs_brec_insert() 151 fd->bnode = hfs_bnode_find(tree, new_node->parent); in hfs_brec_insert() 182 struct hfs_bnode *node, *parent; in hfs_brec_remove() local 200 if (!node->parent) in hfs_brec_remove() 202 parent = hfs_bnode_find(tree, node->parent); in hfs_brec_remove() 203 if (IS_ERR(parent)) in hfs_brec_remove() 204 return PTR_ERR(parent); in hfs_brec_remove() 206 node = fd->bnode = parent; in hfs_brec_remove() 253 new_node->parent = node->parent; in hfs_bnode_split() [all …]
|
/fs/fscache/ |
D | object.c | 151 struct fscache_object *parent = object->parent; in fscache_done_parent_op() local 154 object->debug_id, parent->debug_id, parent->n_ops); in fscache_done_parent_op() 156 spin_lock_nested(&parent->lock, 1); in fscache_done_parent_op() 157 parent->n_obj_ops--; in fscache_done_parent_op() 158 parent->n_ops--; in fscache_done_parent_op() 159 if (parent->n_ops == 0) in fscache_done_parent_op() 160 fscache_raise_event(parent, FSCACHE_OBJECT_EV_CLEARED); in fscache_done_parent_op() 161 spin_unlock(&parent->lock); in fscache_done_parent_op() 327 object->parent = NULL; in fscache_object_init() 375 struct fscache_object *parent; in fscache_initialise_object() local [all …]
|
D | cookie.c | 37 prefix, cookie, cookie->parent, cookie->flags, in fscache_print_cookie() 103 if (a->parent != b->parent) in fscache_compare_cookie() 104 return (long)a->parent - (long)b->parent; in fscache_compare_cookie() 124 struct fscache_cookie *parent, in fscache_alloc_cookie() argument 161 cookie->parent = parent; in fscache_alloc_cookie() 200 fscache_cookie_get(candidate->parent, fscache_cookie_get_acquire_parent); in fscache_hash_cookie() 201 atomic_inc(&candidate->parent->n_children); in fscache_hash_cookie() 238 struct fscache_cookie *parent, in __fscache_acquire_cookie() argument 251 parent ? (char *) parent->def->name : "<no-parent>", in __fscache_acquire_cookie() 264 if (!parent) { in __fscache_acquire_cookie() [all …]
|
/fs/ocfs2/ |
D | export.c | 135 struct dentry *parent; in ocfs2_get_parent() local 145 parent = ERR_PTR(status); in ocfs2_get_parent() 153 parent = ERR_PTR(status); in ocfs2_get_parent() 159 parent = ERR_PTR(-ENOENT); in ocfs2_get_parent() 169 parent = ERR_PTR(status); in ocfs2_get_parent() 176 parent = ERR_PTR(status); in ocfs2_get_parent() 180 parent = d_obtain_alias(ocfs2_iget(OCFS2_SB(dir->i_sb), blkno, 0, 0)); in ocfs2_get_parent() 189 trace_ocfs2_get_parent_end(parent); in ocfs2_get_parent() 191 return parent; in ocfs2_get_parent() 195 struct inode *parent) in ocfs2_encode_fh() argument [all …]
|
/fs/debugfs/ |
D | inode.c | 298 struct dentry *debugfs_lookup(const char *name, struct dentry *parent) in debugfs_lookup() argument 302 if (!debugfs_initialized() || IS_ERR_OR_NULL(name) || IS_ERR(parent)) in debugfs_lookup() 305 if (!parent) in debugfs_lookup() 306 parent = debugfs_mount->mnt_root; in debugfs_lookup() 308 dentry = lookup_positive_unlocked(name, parent, strlen(name)); in debugfs_lookup() 315 static struct dentry *start_creating(const char *name, struct dentry *parent) in start_creating() argument 328 if (IS_ERR(parent)) in start_creating() 329 return parent; in start_creating() 343 if (!parent) in start_creating() 344 parent = debugfs_mount->mnt_root; in start_creating() [all …]
|
D | file.c | 421 struct dentry *parent, void *value, in debugfs_create_mode_unsafe() argument 428 return debugfs_create_file_unsafe(name, mode, parent, value, in debugfs_create_mode_unsafe() 432 return debugfs_create_file_unsafe(name, mode, parent, value, in debugfs_create_mode_unsafe() 435 return debugfs_create_file_unsafe(name, mode, parent, value, fops); in debugfs_create_mode_unsafe() 466 void debugfs_create_u8(const char *name, umode_t mode, struct dentry *parent, in debugfs_create_u8() argument 469 debugfs_create_mode_unsafe(name, mode, parent, value, &fops_u8, in debugfs_create_u8() 502 void debugfs_create_u16(const char *name, umode_t mode, struct dentry *parent, in debugfs_create_u16() argument 505 debugfs_create_mode_unsafe(name, mode, parent, value, &fops_u16, in debugfs_create_u16() 538 void debugfs_create_u32(const char *name, umode_t mode, struct dentry *parent, in debugfs_create_u32() argument 541 debugfs_create_mode_unsafe(name, mode, parent, value, &fops_u32, in debugfs_create_u32() [all …]
|
/fs/vboxsf/ |
D | dir.c | 211 static struct dentry *vboxsf_dir_lookup(struct inode *parent, in vboxsf_dir_lookup() argument 215 struct vboxsf_sbi *sbi = VBOXSF_SBI(parent->i_sb); in vboxsf_dir_lookup() 226 inode = vboxsf_new_inode(parent->i_sb); in vboxsf_dir_lookup() 234 static int vboxsf_dir_instantiate(struct inode *parent, struct dentry *dentry, in vboxsf_dir_instantiate() argument 237 struct vboxsf_sbi *sbi = VBOXSF_SBI(parent->i_sb); in vboxsf_dir_instantiate() 241 inode = vboxsf_new_inode(parent->i_sb); in vboxsf_dir_instantiate() 255 static int vboxsf_dir_create(struct inode *parent, struct dentry *dentry, in vboxsf_dir_create() argument 258 struct vboxsf_inode *sf_parent_i = VBOXSF_I(parent); in vboxsf_dir_create() 259 struct vboxsf_sbi *sbi = VBOXSF_SBI(parent->i_sb); in vboxsf_dir_create() 281 err = vboxsf_dir_instantiate(parent, dentry, ¶ms.info); in vboxsf_dir_create() [all …]
|
/fs/ |
D | dcache.c | 109 static inline struct hlist_bl_head *in_lookup_hash(const struct dentry *parent, in in_lookup_hash() argument 112 hash += (unsigned long) parent / L1_CACHE_BYTES; in in_lookup_hash() 512 static inline void dentry_unlist(struct dentry *dentry, struct dentry *parent) in dentry_unlist() argument 542 while (dentry->d_child.next != &parent->d_subdirs) { in dentry_unlist() 552 struct dentry *parent = NULL; in __dentry_kill() local 555 parent = dentry->d_parent; in __dentry_kill() 575 dentry_unlist(dentry, parent); in __dentry_kill() 576 if (parent) in __dentry_kill() 577 spin_unlock(&parent->d_lock); in __dentry_kill() 599 struct dentry *parent; in __lock_parent() local [all …]
|
D | pnode.c | 246 struct mount *parent = last_source->mnt_parent; in propagate_one() local 249 done = parent->mnt_master == p; in propagate_one() 250 if (done && peers(n, parent)) in propagate_one() 372 struct mount *parent = mnt->mnt_parent; in propagate_mount_busy() local 374 if (mnt == parent) in propagate_mount_busy() 385 for (m = propagation_next(parent, parent); m; in propagate_mount_busy() 386 m = propagation_next(m, parent)) { in propagate_mount_busy() 414 struct mount *parent = mnt->mnt_parent; in propagate_mount_unlock() local 417 BUG_ON(parent == mnt); in propagate_mount_unlock() 419 for (m = propagation_next(parent, parent); m; in propagate_mount_unlock() [all …]
|
/fs/overlayfs/ |
D | export.c | 107 struct dentry *next, *parent = NULL; in ovl_connect_layer() local 122 parent = dget_parent(next); in ovl_connect_layer() 123 if (WARN_ON(parent == next)) { in ovl_connect_layer() 132 if (ovl_connectable_layer(parent) < origin_layer) { in ovl_connect_layer() 138 if (ovl_dentry_test_flag(OVL_E_CONNECTED, parent) || in ovl_connect_layer() 139 ovl_test_flag(OVL_INDEX, d_inode(parent))) in ovl_connect_layer() 143 next = parent; in ovl_connect_layer() 146 dput(parent); in ovl_connect_layer() 250 struct inode *parent) in ovl_encode_fh() argument 256 if (parent) in ovl_encode_fh() [all …]
|
/fs/gfs2/ |
D | export.c | 29 struct inode *parent) in gfs2_encode_fh() argument 35 if (parent && (*len < GFS2_LARGE_FH_SIZE)) { in gfs2_encode_fh() 49 if (!parent || inode == d_inode(sb->s_root)) in gfs2_encode_fh() 52 ip = GFS2_I(parent); in gfs2_encode_fh() 85 static int gfs2_get_name(struct dentry *parent, char *name, in gfs2_get_name() argument 88 struct inode *dir = d_inode(parent); in gfs2_get_name() 171 struct gfs2_inum_host parent; in gfs2_fh_to_parent() local 179 parent.no_formal_ino = ((u64)be32_to_cpu(fh[4])) << 32; in gfs2_fh_to_parent() 180 parent.no_formal_ino |= be32_to_cpu(fh[5]); in gfs2_fh_to_parent() 181 parent.no_addr = ((u64)be32_to_cpu(fh[6])) << 32; in gfs2_fh_to_parent() [all …]
|
/fs/ceph/ |
D | snap.c | 89 struct rb_node *parent = NULL; in __insert_snap_realm() local 93 parent = *p; in __insert_snap_realm() 94 r = rb_entry(parent, struct ceph_snap_realm, node); in __insert_snap_realm() 103 rb_link_node(&new->node, parent, p); in __insert_snap_realm() 192 if (realm->parent) { in __destroy_snap_realm() 194 __put_snap_realm(mdsc, realm->parent); in __destroy_snap_realm() 282 struct ceph_snap_realm *parent; in adjust_snap_realm_parent() local 289 parent = ceph_lookup_snap_realm(mdsc, parentino); in adjust_snap_realm_parent() 290 if (!parent) { in adjust_snap_realm_parent() 291 parent = ceph_create_snap_realm(mdsc, parentino); in adjust_snap_realm_parent() [all …]
|
/fs/tracefs/ |
D | inode.c | 178 static void set_gid(struct dentry *parent, kgid_t gid) in set_gid() argument 183 this_parent = parent; in set_gid() 213 if (this_parent != parent) { in set_gid() 400 static struct dentry *start_creating(const char *name, struct dentry *parent) in start_creating() argument 417 if (!parent) in start_creating() 418 parent = tracefs_mount->mnt_root; in start_creating() 420 inode_lock(parent->d_inode); in start_creating() 421 if (unlikely(IS_DEADDIR(parent->d_inode))) in start_creating() 424 dentry = lookup_one_len(name, parent, strlen(name)); in start_creating() 431 inode_unlock(parent->d_inode); in start_creating() [all …]
|
/fs/ubifs/ |
D | lpt.c | 486 struct ubifs_nnode *np = nnode->parent; in ubifs_add_nnode_dirt() 507 ubifs_add_lpt_dirt(c, pnode->parent->nbranch[pnode->iip].lnum, in add_pnode_dirt() 549 struct ubifs_nnode *parent, int iip) in calc_nnode_num_from_parent() argument 553 if (!parent) in calc_nnode_num_from_parent() 555 shft = (c->lpt_hght - parent->level) * UBIFS_LPT_FANOUT_SHIFT; in calc_nnode_num_from_parent() 556 num = parent->num ^ (1 << shft); in calc_nnode_num_from_parent() 574 struct ubifs_nnode *parent, int iip) in calc_pnode_num_from_parent() argument 576 int i, n = c->lpt_hght - 1, pnum = parent->num, num = 0; in calc_pnode_num_from_parent() 1105 struct ubifs_nnode *parent, int iip) in validate_nnode() argument 1110 int num = calc_nnode_num_from_parent(c, parent, iip); in validate_nnode() [all …]
|