Lines Matching full:de
46 static int proc_match(const char *name, struct proc_dir_entry *de, unsigned int len) in proc_match() argument
48 if (len < de->namelen) in proc_match()
50 if (len > de->namelen) in proc_match()
53 return memcmp(name, de->name, len); in proc_match()
75 struct proc_dir_entry *de = rb_entry(node, in pde_subdir_find() local
78 int result = proc_match(name, de, len); in pde_subdir_find()
85 return de; in pde_subdir_find()
91 struct proc_dir_entry *de) in pde_subdir_insert() argument
101 int result = proc_match(de->name, this, de->namelen); in pde_subdir_insert()
113 rb_link_node(&de->subdir_node, parent, new); in pde_subdir_insert()
114 rb_insert_color(&de->subdir_node, root); in pde_subdir_insert()
121 struct proc_dir_entry *de = PDE(inode); in proc_notify_change() local
131 proc_set_user(de, inode->i_uid, inode->i_gid); in proc_notify_change()
132 de->mode = inode->i_mode; in proc_notify_change()
140 struct proc_dir_entry *de = PDE(inode); in proc_getattr() local
141 if (de) { in proc_getattr()
142 nlink_t nlink = READ_ONCE(de->nlink); in proc_getattr()
165 struct proc_dir_entry *de; in __xlate_proc_name() local
167 de = *ret; in __xlate_proc_name()
168 if (!de) in __xlate_proc_name()
169 de = &proc_root; in __xlate_proc_name()
176 de = pde_subdir_find(de, cp, next - cp); in __xlate_proc_name()
177 if (!de) { in __xlate_proc_name()
184 *ret = de; in __xlate_proc_name()
250 struct proc_dir_entry *de) in proc_lookup_de() argument
255 de = pde_subdir_find(de, dentry->d_name.name, dentry->d_name.len); in proc_lookup_de()
256 if (de) { in proc_lookup_de()
257 pde_get(de); in proc_lookup_de()
259 inode = proc_get_inode(dir->i_sb, de); in proc_lookup_de()
262 d_set_d_op(dentry, de->proc_dops); in proc_lookup_de()
290 struct proc_dir_entry *de) in proc_readdir_de() argument
299 de = pde_subdir_first(de); in proc_readdir_de()
301 if (!de) { in proc_readdir_de()
307 de = pde_subdir_next(de); in proc_readdir_de()
313 pde_get(de); in proc_readdir_de()
315 if (!dir_emit(ctx, de->name, de->namelen, in proc_readdir_de()
316 de->low_ino, de->mode >> 12)) { in proc_readdir_de()
317 pde_put(de); in proc_readdir_de()
322 next = pde_subdir_next(de); in proc_readdir_de()
323 pde_put(de); in proc_readdir_de()
324 de = next; in proc_readdir_de()
325 } while (de); in proc_readdir_de()
574 struct proc_dir_entry *de = PDE(inode); in proc_seq_open() local
576 if (de->state_size) in proc_seq_open()
577 return seq_open_private(file, de->seq_ops, de->state_size); in proc_seq_open()
578 return seq_open(file, de->seq_ops); in proc_seq_open()
583 struct proc_dir_entry *de = PDE(inode); in proc_seq_release() local
585 if (de->state_size) in proc_seq_release()
616 struct proc_dir_entry *de = PDE(inode); in proc_single_open() local
618 return single_open(file, de->single_show, de->data); in proc_single_open()
644 void proc_set_size(struct proc_dir_entry *de, loff_t size) in proc_set_size() argument
646 de->size = size; in proc_set_size()
650 void proc_set_user(struct proc_dir_entry *de, kuid_t uid, kgid_t gid) in proc_set_user() argument
652 de->uid = uid; in proc_set_user()
653 de->gid = gid; in proc_set_user()
670 struct proc_dir_entry *de = NULL; in remove_proc_entry() local
681 de = pde_subdir_find(parent, fn, len); in remove_proc_entry()
682 if (de) { in remove_proc_entry()
683 if (unlikely(pde_is_permanent(de))) { in remove_proc_entry()
684 WARN(1, "removing permanent /proc entry '%s'", de->name); in remove_proc_entry()
685 de = NULL; in remove_proc_entry()
687 rb_erase(&de->subdir_node, &parent->subdir); in remove_proc_entry()
688 if (S_ISDIR(de->mode)) in remove_proc_entry()
693 if (!de) { in remove_proc_entry()
698 proc_entry_rundown(de); in remove_proc_entry()
700 WARN(pde_subdir_first(de), in remove_proc_entry()
702 __func__, de->parent->name, de->name, pde_subdir_first(de)->name); in remove_proc_entry()
703 pde_put(de); in remove_proc_entry()
709 struct proc_dir_entry *root = NULL, *de, *next; in remove_proc_subtree() local
733 de = root; in remove_proc_subtree()
735 next = pde_subdir_first(de); in remove_proc_subtree()
743 rb_erase(&next->subdir_node, &de->subdir); in remove_proc_subtree()
744 de = next; in remove_proc_subtree()
747 next = de->parent; in remove_proc_subtree()
748 if (S_ISDIR(de->mode)) in remove_proc_subtree()
752 proc_entry_rundown(de); in remove_proc_subtree()
753 if (de == root) in remove_proc_subtree()
755 pde_put(de); in remove_proc_subtree()
758 de = next; in remove_proc_subtree()
767 struct proc_dir_entry *de = PDE(inode); in proc_get_parent_data() local
768 return de->parent->data; in proc_get_parent_data()
772 void proc_remove(struct proc_dir_entry *de) in proc_remove() argument
774 if (de) in proc_remove()
775 remove_proc_subtree(de->name, de->parent); in proc_remove()