Lines Matching refs:parent
79 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()
410 if (proc_register(parent, ent) < 0) { in proc_symlink()
425 struct proc_dir_entry *parent, void *data) in proc_mkdir_data() argument
432 ent = __proc_create(&parent, name, S_IFDIR | mode, 2); in proc_mkdir_data()
437 parent->nlink++; in proc_mkdir_data()
438 if (proc_register(parent, ent) < 0) { in proc_mkdir_data()
440 parent->nlink--; in proc_mkdir_data()
449 struct proc_dir_entry *parent) in proc_mkdir_mode() argument
451 return proc_mkdir_data(name, mode, parent, NULL); in proc_mkdir_mode()
456 struct proc_dir_entry *parent) in proc_mkdir() argument
458 return proc_mkdir_data(name, 0, parent, NULL); in proc_mkdir()
465 struct proc_dir_entry *ent, *parent = NULL; in proc_create_mount_point() local
467 ent = __proc_create(&parent, name, mode, 2); in proc_create_mount_point()
472 parent->nlink++; in proc_create_mount_point()
473 if (proc_register(parent, ent) < 0) { in proc_create_mount_point()
475 parent->nlink--; in proc_create_mount_point()
483 struct proc_dir_entry *parent, in proc_create_data() argument
500 pde = __proc_create(&parent, name, mode, 1); in proc_create_data()
506 if (proc_register(parent, pde) < 0) in proc_create_data()
547 void remove_proc_entry(const char *name, struct proc_dir_entry *parent) in remove_proc_entry() argument
554 if (__xlate_proc_name(name, &parent, &fn) != 0) { in remove_proc_entry()
560 de = pde_subdir_find(parent, fn, len); in remove_proc_entry()
562 rb_erase(&de->subdir_node, &parent->subdir); in remove_proc_entry()
572 parent->nlink--; in remove_proc_entry()
576 __func__, de->parent->name, de->name, pde_subdir_first(de)->name); in remove_proc_entry()
581 int remove_proc_subtree(const char *name, struct proc_dir_entry *parent) in remove_proc_subtree() argument
588 if (__xlate_proc_name(name, &parent, &fn) != 0) { in remove_proc_subtree()
594 root = pde_subdir_find(parent, fn, len); in remove_proc_subtree()
599 rb_erase(&root->subdir_node, &parent->subdir); in remove_proc_subtree()
612 next = de->parent; in remove_proc_subtree()
631 return de->parent->data; in proc_get_parent_data()
638 remove_proc_subtree(de->name, de->parent); in proc_remove()