Home
last modified time | relevance | path

Searched refs:parent (Results 1 – 25 of 242) sorted by relevance

12345678910

/fs/sysfs/
Dgroup.c21 static void remove_files(struct kernfs_node *parent, in remove_files() argument
29 kernfs_remove_by_name(parent, (*attr)->name); in remove_files()
32 kernfs_remove_by_name(parent, (*bin_attr)->attr.name); in remove_files()
35 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()
100 remove_files(parent, grp); in create_files()
[all …]
Ddir.c22 void sysfs_warn_dup(struct kernfs_node *parent, const char *name) in sysfs_warn_dup() argument
28 path = kernfs_path(parent, buf, PATH_MAX); in sysfs_warn_dup()
43 struct kernfs_node *parent, *kn; in sysfs_create_dir_ns() local
47 if (kobj->parent) in sysfs_create_dir_ns()
48 parent = kobj->parent->sd; in sysfs_create_dir_ns()
50 parent = sysfs_root_kn; in sysfs_create_dir_ns()
52 if (!parent) in sysfs_create_dir_ns()
55 kn = kernfs_create_dir_ns(parent, kobject_name(kobj), in sysfs_create_dir_ns()
59 sysfs_warn_dup(parent, kobject_name(kobj)); in sysfs_create_dir_ns()
104 struct kernfs_node *parent; in sysfs_rename_dir_ns() local
[all …]
Dsymlink.c21 static int sysfs_do_create_link_sd(struct kernfs_node *parent, in sysfs_do_create_link_sd() argument
27 BUG_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()
144 struct kernfs_node *parent = NULL; in sysfs_remove_link() local
[all …]
Dfile.c31 struct kobject *kobj = kn->parent->priv; in sysfs_file_ops()
46 struct kobject *kobj = of->kn->parent->priv; in sysfs_kf_seq_show()
87 struct kobject *kobj = of->kn->parent->priv; in sysfs_kf_bin_read()
111 struct kobject *kobj = of->kn->parent->priv; in sysfs_kf_read()
137 struct kobject *kobj = of->kn->parent->priv; in sysfs_kf_write()
150 struct kobject *kobj = of->kn->parent->priv; in sysfs_kf_bin_write()
171 struct kobject *kobj = of->kn->parent->priv; in sysfs_kf_bin_mmap()
249 int sysfs_add_file_mode_ns(struct kernfs_node *parent, in sysfs_add_file_mode_ns() argument
259 struct kobject *kobj = parent->priv; in sysfs_add_file_mode_ns()
308 kn = __kernfs_create_file(parent, attr->name, mode & 0777, size, ops, in sysfs_add_file_mode_ns()
[all …]
/fs/kernfs/
Ddir.c44 return strlcpy(buf, kn->parent ? kn->name : "/", buflen); in kernfs_name_locked()
65 kn = kn->parent; in kernfs_path_locked()
66 } while (kn && kn->parent); in kernfs_path_locked()
109 kn = kn->parent; in kernfs_path_len()
110 } while (kn && kn->parent); in kernfs_path_len()
190 struct kernfs_node *parent; in kernfs_get_parent() local
194 parent = kn->parent; in kernfs_get_parent()
195 kernfs_get(parent); in kernfs_get_parent()
198 return parent; in kernfs_get_parent()
259 struct rb_node **node = &kn->parent->dir.children.rb_node; in kernfs_link_sibling()
[all …]
Dsymlink.c25 struct kernfs_node *kernfs_create_link(struct kernfs_node *parent, in kernfs_create_link() argument
32 kn = kernfs_new_node(parent, name, S_IFLNK|S_IRWXUGO, KERNFS_LINK); in kernfs_create_link()
36 if (kernfs_ns_enabled(parent)) in kernfs_create_link()
49 static int kernfs_get_target_path(struct kernfs_node *parent, in kernfs_get_target_path() argument
57 base = parent; in kernfs_get_target_path()
58 while (base->parent) { in kernfs_get_target_path()
59 kn = target->parent; in kernfs_get_target_path()
60 while (kn->parent && base != kn) in kernfs_get_target_path()
61 kn = kn->parent; in kernfs_get_target_path()
71 base = base->parent; in kernfs_get_target_path()
[all …]
/fs/debugfs/
Dinode.c250 static struct dentry *start_creating(const char *name, struct dentry *parent) in start_creating() argument
257 if (IS_ERR(parent)) in start_creating()
258 return parent; in start_creating()
270 if (!parent) in start_creating()
271 parent = debugfs_mount->mnt_root; in start_creating()
273 mutex_lock(&d_inode(parent)->i_mutex); in start_creating()
274 dentry = lookup_one_len(name, parent, strlen(name)); in start_creating()
281 mutex_unlock(&d_inode(parent)->i_mutex); in start_creating()
329 struct dentry *parent, void *data, in debugfs_create_file() argument
338 dentry = start_creating(name, parent); in debugfs_create_file()
[all …]
Dfile.c46 struct dentry *parent, void *value, in debugfs_create_mode() argument
53 return debugfs_create_file(name, mode, parent, value, fops_ro); in debugfs_create_mode()
56 return debugfs_create_file(name, mode, parent, value, fops_wo); in debugfs_create_mode()
58 return debugfs_create_file(name, mode, parent, value, fops); in debugfs_create_mode()
100 struct dentry *parent, u8 *value) in debugfs_create_u8() argument
102 return debugfs_create_mode(name, mode, parent, value, &fops_u8, in debugfs_create_u8()
146 struct dentry *parent, u16 *value) in debugfs_create_u16() argument
148 return debugfs_create_mode(name, mode, parent, value, &fops_u16, in debugfs_create_u16()
192 struct dentry *parent, u32 *value) in debugfs_create_u32() argument
194 return debugfs_create_mode(name, mode, parent, value, &fops_u32, in debugfs_create_u32()
[all …]
/fs/tracefs/
Dinode.c179 static void set_gid(struct dentry *parent, kgid_t gid) in set_gid() argument
184 this_parent = parent; in set_gid()
214 if (this_parent != parent) { in set_gid()
389 static struct dentry *start_creating(const char *name, struct dentry *parent) in start_creating() argument
406 if (!parent) in start_creating()
407 parent = tracefs_mount->mnt_root; in start_creating()
409 mutex_lock(&parent->d_inode->i_mutex); in start_creating()
410 dentry = lookup_one_len(name, parent, strlen(name)); in start_creating()
417 mutex_unlock(&parent->d_inode->i_mutex); in start_creating()
465 struct dentry *parent, void *data, in tracefs_create_file() argument
[all …]
/fs/exportfs/
Dexpfs.c76 struct dentry *parent = dget_parent(dentry); in dentry_connected() local
79 if (dentry == parent) { in dentry_connected()
80 dput(parent); in dentry_connected()
83 dentry = parent; in dentry_connected()
93 struct dentry *parent = dget_parent(dentry); in clear_disconnected() local
102 dentry = parent; in clear_disconnected()
122 struct dentry *parent; in reconnect_one() local
126 parent = ERR_PTR(-EACCES); in reconnect_one()
129 parent = mnt->mnt_sb->s_export_op->get_parent(dentry); in reconnect_one()
132 if (IS_ERR(parent)) { in reconnect_one()
[all …]
/fs/proc/
Dgeneric.c79 struct rb_node **new = &root->rb_node, *parent = NULL; in pde_subdir_insert() local
87 parent = *new; in pde_subdir_insert()
97 rb_link_node(&de->subdir_node, parent, new); in pde_subdir_insert()
342 dp->parent = dir; in proc_register()
355 static struct proc_dir_entry *__proc_create(struct proc_dir_entry **parent, in __proc_create() argument
364 if (xlate_proc_name(name, parent, &fn) != 0) in __proc_create()
372 if (*parent == &proc_root && name_to_int(&qstr) != ~0U) { in __proc_create()
376 if (is_empty_pde(*parent)) { in __proc_create()
398 struct proc_dir_entry *parent, const char *dest) in proc_symlink() argument
402 ent = __proc_create(&parent, name, in proc_symlink()
[all …]
/fs/hfs/
Dbrec.c146 if (!new_node->parent) { in hfs_brec_insert()
148 new_node->parent = tree->root; in hfs_brec_insert()
150 fd->bnode = hfs_bnode_find(tree, new_node->parent); in hfs_brec_insert()
179 struct hfs_bnode *node, *parent; in hfs_brec_remove() local
197 if (!node->parent) in hfs_brec_remove()
199 parent = hfs_bnode_find(tree, node->parent); in hfs_brec_remove()
200 if (IS_ERR(parent)) in hfs_brec_remove()
201 return PTR_ERR(parent); in hfs_brec_remove()
203 node = fd->bnode = parent; in hfs_brec_remove()
248 new_node->parent = node->parent; in hfs_bnode_split()
[all …]
/fs/fscache/
Dobject.c152 struct fscache_object *parent = object->parent; in fscache_done_parent_op() local
155 object->debug_id, parent->debug_id, parent->n_ops); in fscache_done_parent_op()
157 spin_lock_nested(&parent->lock, 1); in fscache_done_parent_op()
158 parent->n_obj_ops--; in fscache_done_parent_op()
159 parent->n_ops--; in fscache_done_parent_op()
160 if (parent->n_ops == 0) in fscache_done_parent_op()
161 fscache_raise_event(parent, FSCACHE_OBJECT_EV_CLEARED); in fscache_done_parent_op()
162 spin_unlock(&parent->lock); in fscache_done_parent_op()
321 object->parent = NULL; in fscache_object_init()
369 struct fscache_object *parent; in fscache_initialise_object() local
[all …]
Dcookie.c59 struct fscache_cookie *parent, in __fscache_acquire_cookie() argument
69 parent ? (char *) parent->def->name : "<no-parent>", in __fscache_acquire_cookie()
75 if (!parent) { in __fscache_acquire_cookie()
86 parent->def->type != FSCACHE_COOKIE_TYPE_INDEX); in __fscache_acquire_cookie()
104 atomic_inc(&parent->usage); in __fscache_acquire_cookie()
105 atomic_inc(&parent->n_children); in __fscache_acquire_cookie()
108 cookie->parent = parent; in __fscache_acquire_cookie()
136 atomic_dec(&parent->n_children); in __fscache_acquire_cookie()
213 cache = fscache_select_cache_for_object(cookie->parent); in fscache_acquire_non_index_cookie()
312 ret = fscache_alloc_object(cache, cookie->parent); in fscache_alloc_object()
[all …]
/fs/hfsplus/
Dbrec.c145 if (!new_node->parent) { in hfs_brec_insert()
147 new_node->parent = tree->root; in hfs_brec_insert()
149 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()
251 new_node->parent = node->parent; in hfs_bnode_split()
[all …]
/fs/ocfs2/
Dexport.c149 struct dentry *parent; in ocfs2_get_parent() local
159 parent = ERR_PTR(status); in ocfs2_get_parent()
167 parent = ERR_PTR(status); in ocfs2_get_parent()
173 parent = ERR_PTR(-ENOENT); in ocfs2_get_parent()
183 parent = ERR_PTR(status); in ocfs2_get_parent()
190 parent = ERR_PTR(status); in ocfs2_get_parent()
194 parent = d_obtain_alias(ocfs2_iget(OCFS2_SB(dir->i_sb), blkno, 0, 0)); in ocfs2_get_parent()
203 trace_ocfs2_get_parent_end(parent); in ocfs2_get_parent()
205 return parent; in ocfs2_get_parent()
209 struct inode *parent) in ocfs2_encode_fh() argument
[all …]
/fs/
Dpnode.c249 struct mount *parent = last_source->mnt_parent; in propagate_one() local
252 done = parent->mnt_master == p; in propagate_one()
253 if (done && peers(n, parent)) in propagate_one()
380 struct mount *parent = mnt->mnt_parent; in propagate_mount_busy() local
382 if (mnt == parent) in propagate_mount_busy()
393 for (m = propagation_next(parent, parent); m; in propagate_mount_busy()
394 m = propagation_next(m, parent)) { in propagate_mount_busy()
422 struct mount *parent = mnt->mnt_parent; in propagate_mount_unlock() local
425 BUG_ON(parent == mnt); in propagate_mount_unlock()
427 for (m = propagation_next(parent, parent); m; in propagate_mount_unlock()
[all …]
Ddcache.c107 static inline struct hlist_bl_head *d_hash(const struct dentry *parent, in d_hash() argument
110 hash += (unsigned long) parent / L1_CACHE_BYTES; in d_hash()
529 struct dentry *parent = NULL; in __dentry_kill() local
532 parent = dentry->d_parent; in __dentry_kill()
558 if (parent) in __dentry_kill()
559 spin_unlock(&parent->d_lock); in __dentry_kill()
590 struct dentry *parent = NULL; in dentry_kill() local
596 parent = dentry->d_parent; in dentry_kill()
597 if (unlikely(!spin_trylock(&parent->d_lock))) { in dentry_kill()
605 return parent; in dentry_kill()
[all …]
/fs/ceph/
Dsnap.c84 struct rb_node *parent = NULL; in __insert_snap_realm() local
88 parent = *p; in __insert_snap_realm()
89 r = rb_entry(parent, struct ceph_snap_realm, node); in __insert_snap_realm()
98 rb_link_node(&new->node, parent, p); in __insert_snap_realm()
178 if (realm->parent) { in __destroy_snap_realm()
180 __put_snap_realm(mdsc, realm->parent); in __destroy_snap_realm()
264 struct ceph_snap_realm *parent; in adjust_snap_realm_parent() local
269 parent = ceph_lookup_snap_realm(mdsc, parentino); in adjust_snap_realm_parent()
270 if (!parent) { in adjust_snap_realm_parent()
271 parent = ceph_create_snap_realm(mdsc, parentino); in adjust_snap_realm_parent()
[all …]
/fs/gfs2/
Dexport.c32 struct inode *parent) in gfs2_encode_fh() argument
38 if (parent && (*len < GFS2_LARGE_FH_SIZE)) { in gfs2_encode_fh()
52 if (!parent || inode == d_inode(sb->s_root)) in gfs2_encode_fh()
55 ip = GFS2_I(parent); in gfs2_encode_fh()
88 static int gfs2_get_name(struct dentry *parent, char *name, in gfs2_get_name() argument
91 struct inode *dir = d_inode(parent); in gfs2_get_name()
183 struct gfs2_inum_host parent; in gfs2_fh_to_parent() local
191 parent.no_formal_ino = ((u64)be32_to_cpu(fh[4])) << 32; in gfs2_fh_to_parent()
192 parent.no_formal_ino |= be32_to_cpu(fh[5]); in gfs2_fh_to_parent()
193 parent.no_addr = ((u64)be32_to_cpu(fh[6])) << 32; in gfs2_fh_to_parent()
[all …]
Ddentry.c38 struct dentry *parent; in gfs2_drevalidate() local
50 parent = dget_parent(dentry); in gfs2_drevalidate()
51 sdp = GFS2_SB(d_inode(parent)); in gfs2_drevalidate()
52 dip = GFS2_I(d_inode(parent)); in gfs2_drevalidate()
71 error = gfs2_dir_check(d_inode(parent), &dentry->d_name, ip); in gfs2_drevalidate()
89 dput(parent); in gfs2_drevalidate()
96 dput(parent); in gfs2_drevalidate()
102 dput(parent); in gfs2_drevalidate()
/fs/ubifs/
Dlpt.c496 struct ubifs_nnode *np = nnode->parent; in ubifs_add_nnode_dirt()
517 ubifs_add_lpt_dirt(c, pnode->parent->nbranch[pnode->iip].lnum, in add_pnode_dirt()
559 struct ubifs_nnode *parent, int iip) in calc_nnode_num_from_parent() argument
563 if (!parent) in calc_nnode_num_from_parent()
565 shft = (c->lpt_hght - parent->level) * UBIFS_LPT_FANOUT_SHIFT; in calc_nnode_num_from_parent()
566 num = parent->num ^ (1 << shft); in calc_nnode_num_from_parent()
584 struct ubifs_nnode *parent, int iip) in calc_pnode_num_from_parent() argument
586 int i, n = c->lpt_hght - 1, pnum = parent->num, num = 0; in calc_pnode_num_from_parent()
1095 struct ubifs_nnode *parent, int iip) in validate_nnode() argument
1100 int num = calc_nnode_num_from_parent(c, parent, iip); in validate_nnode()
[all …]
/fs/sdcardfs/
Dderived_perm.c24 static void inherit_derived_state(struct inode *parent, struct inode *child) in inherit_derived_state() argument
26 struct sdcardfs_inode_info *pi = SDCARDFS_I(parent); in inherit_derived_state()
54 void get_derived_permission_new(struct dentry *parent, struct dentry *dentry, in get_derived_permission_new() argument
58 struct sdcardfs_inode_info *parent_info = SDCARDFS_I(d_inode(parent)); in get_derived_permission_new()
77 inherit_derived_state(d_inode(parent), d_inode(dentry)); in get_derived_permission_new()
144 void get_derived_permission(struct dentry *parent, struct dentry *dentry) in get_derived_permission() argument
146 get_derived_permission_new(parent, dentry, &dentry->d_name); in get_derived_permission()
331 struct dentry *parent; in update_derived_permission_lock() local
342 parent = dget_parent(dentry); in update_derived_permission_lock()
343 if (parent) { in update_derived_permission_lock()
[all …]
/fs/btrfs/
Dextent_map.c95 struct rb_node *parent = NULL; in tree_insert() local
101 parent = *p; in tree_insert()
102 entry = rb_entry(parent, struct extent_map, rb_node); in tree_insert()
112 orig_parent = parent; in tree_insert()
113 while (parent && em->start >= extent_map_end(entry)) { in tree_insert()
114 parent = rb_next(parent); in tree_insert()
115 entry = rb_entry(parent, struct extent_map, rb_node); in tree_insert()
117 if (parent) in tree_insert()
121 parent = orig_parent; in tree_insert()
122 entry = rb_entry(parent, struct extent_map, rb_node); in tree_insert()
[all …]
/fs/crypto/
Dpolicy.c156 int fscrypt_has_permitted_context(struct inode *parent, struct inode *child) in fscrypt_has_permitted_context() argument
158 const struct fscrypt_operations *cops = parent->i_sb->s_cop; in fscrypt_has_permitted_context()
169 if (!IS_ENCRYPTED(parent)) in fscrypt_has_permitted_context()
191 res = fscrypt_get_encryption_info(parent); in fscrypt_has_permitted_context()
197 parent_ci = parent->i_crypt_info; in fscrypt_has_permitted_context()
209 res = cops->get_context(parent, &parent_ctx, sizeof(parent_ctx)); in fscrypt_has_permitted_context()
237 int fscrypt_inherit_context(struct inode *parent, struct inode *child, in fscrypt_inherit_context() argument
244 res = fscrypt_get_encryption_info(parent); in fscrypt_inherit_context()
248 ci = parent->i_crypt_info; in fscrypt_inherit_context()
259 res = parent->i_sb->s_cop->set_context(child, &ctx, in fscrypt_inherit_context()

12345678910