Lines Matching refs: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()
122 struct proc_dir_entry *de = PDE(inode); in proc_notify_change() local
132 proc_set_user(de, inode->i_uid, inode->i_gid); in proc_notify_change()
133 de->mode = inode->i_mode; in proc_notify_change()
142 struct proc_dir_entry *de = PDE(inode); in proc_getattr() local
143 if (de) { in proc_getattr()
144 nlink_t nlink = READ_ONCE(de->nlink); in proc_getattr()
167 struct proc_dir_entry *de; in __xlate_proc_name() local
169 de = *ret ?: &proc_root; in __xlate_proc_name()
171 de = pde_subdir_find(de, cp, next - cp); in __xlate_proc_name()
172 if (!de) { in __xlate_proc_name()
179 *ret = de; in __xlate_proc_name()
245 struct proc_dir_entry *de) in proc_lookup_de() argument
250 de = pde_subdir_find(de, dentry->d_name.name, dentry->d_name.len); in proc_lookup_de()
251 if (de) { in proc_lookup_de()
252 pde_get(de); in proc_lookup_de()
254 inode = proc_get_inode(dir->i_sb, de); in proc_lookup_de()
257 d_set_d_op(dentry, de->proc_dops); in proc_lookup_de()
285 struct proc_dir_entry *de) in proc_readdir_de() argument
294 de = pde_subdir_first(de); in proc_readdir_de()
296 if (!de) { in proc_readdir_de()
302 de = pde_subdir_next(de); in proc_readdir_de()
308 pde_get(de); in proc_readdir_de()
310 if (!dir_emit(ctx, de->name, de->namelen, in proc_readdir_de()
311 de->low_ino, de->mode >> 12)) { in proc_readdir_de()
312 pde_put(de); in proc_readdir_de()
317 next = pde_subdir_next(de); in proc_readdir_de()
318 pde_put(de); in proc_readdir_de()
319 de = next; in proc_readdir_de()
320 } while (de); in proc_readdir_de()
589 struct proc_dir_entry *de = PDE(inode); in proc_seq_open() local
591 if (de->state_size) in proc_seq_open()
592 return seq_open_private(file, de->seq_ops, de->state_size); in proc_seq_open()
593 return seq_open(file, de->seq_ops); in proc_seq_open()
598 struct proc_dir_entry *de = PDE(inode); in proc_seq_release() local
600 if (de->state_size) in proc_seq_release()
631 struct proc_dir_entry *de = PDE(inode); in proc_single_open() local
633 return single_open(file, de->single_show, de->data); in proc_single_open()
659 void proc_set_size(struct proc_dir_entry *de, loff_t size) in proc_set_size() argument
661 de->size = size; in proc_set_size()
665 void proc_set_user(struct proc_dir_entry *de, kuid_t uid, kgid_t gid) in proc_set_user() argument
667 de->uid = uid; in proc_set_user()
668 de->gid = gid; in proc_set_user()
685 struct proc_dir_entry *de = NULL; in remove_proc_entry() local
696 de = pde_subdir_find(parent, fn, len); in remove_proc_entry()
697 if (de) { in remove_proc_entry()
698 if (unlikely(pde_is_permanent(de))) { in remove_proc_entry()
699 WARN(1, "removing permanent /proc entry '%s'", de->name); in remove_proc_entry()
700 de = NULL; in remove_proc_entry()
702 rb_erase(&de->subdir_node, &parent->subdir); in remove_proc_entry()
703 if (S_ISDIR(de->mode)) in remove_proc_entry()
708 if (!de) { in remove_proc_entry()
713 proc_entry_rundown(de); in remove_proc_entry()
715 WARN(pde_subdir_first(de), in remove_proc_entry()
717 __func__, de->parent->name, de->name, pde_subdir_first(de)->name); in remove_proc_entry()
718 pde_put(de); in remove_proc_entry()
724 struct proc_dir_entry *root = NULL, *de, *next; in remove_proc_subtree() local
748 de = root; in remove_proc_subtree()
750 next = pde_subdir_first(de); in remove_proc_subtree()
758 rb_erase(&next->subdir_node, &de->subdir); in remove_proc_subtree()
759 de = next; in remove_proc_subtree()
762 next = de->parent; in remove_proc_subtree()
763 if (S_ISDIR(de->mode)) in remove_proc_subtree()
767 proc_entry_rundown(de); in remove_proc_subtree()
768 if (de == root) in remove_proc_subtree()
770 pde_put(de); in remove_proc_subtree()
773 de = next; in remove_proc_subtree()
782 struct proc_dir_entry *de = PDE(inode); in proc_get_parent_data() local
783 return de->parent->data; in proc_get_parent_data()
787 void proc_remove(struct proc_dir_entry *de) in proc_remove() argument
789 if (de) in proc_remove()
790 remove_proc_subtree(de->name, de->parent); in proc_remove()