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()
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()
592 struct proc_dir_entry *de = PDE(inode); in proc_seq_open() local
594 if (de->state_size) in proc_seq_open()
595 return seq_open_private(file, de->seq_ops, de->state_size); in proc_seq_open()
596 return seq_open(file, de->seq_ops); in proc_seq_open()
601 struct proc_dir_entry *de = PDE(inode); in proc_seq_release() local
603 if (de->state_size) in proc_seq_release()
634 struct proc_dir_entry *de = PDE(inode); in proc_single_open() local
636 return single_open(file, de->single_show, de->data); in proc_single_open()
662 void proc_set_size(struct proc_dir_entry *de, loff_t size) in proc_set_size() argument
664 de->size = size; in proc_set_size()
668 void proc_set_user(struct proc_dir_entry *de, kuid_t uid, kgid_t gid) in proc_set_user() argument
670 de->uid = uid; in proc_set_user()
671 de->gid = gid; in proc_set_user()
688 struct proc_dir_entry *de = NULL; in remove_proc_entry() local
699 de = pde_subdir_find(parent, fn, len); in remove_proc_entry()
700 if (de) { in remove_proc_entry()
701 if (unlikely(pde_is_permanent(de))) { in remove_proc_entry()
702 WARN(1, "removing permanent /proc entry '%s'", de->name); in remove_proc_entry()
703 de = NULL; in remove_proc_entry()
705 rb_erase(&de->subdir_node, &parent->subdir); in remove_proc_entry()
706 if (S_ISDIR(de->mode)) in remove_proc_entry()
711 if (!de) { in remove_proc_entry()
716 proc_entry_rundown(de); in remove_proc_entry()
718 WARN(pde_subdir_first(de), in remove_proc_entry()
720 __func__, de->parent->name, de->name, pde_subdir_first(de)->name); in remove_proc_entry()
721 pde_put(de); in remove_proc_entry()
727 struct proc_dir_entry *root = NULL, *de, *next; in remove_proc_subtree() local
751 de = root; in remove_proc_subtree()
753 next = pde_subdir_first(de); in remove_proc_subtree()
761 rb_erase(&next->subdir_node, &de->subdir); in remove_proc_subtree()
762 de = next; in remove_proc_subtree()
765 next = de->parent; in remove_proc_subtree()
766 if (S_ISDIR(de->mode)) in remove_proc_subtree()
770 proc_entry_rundown(de); in remove_proc_subtree()
771 if (de == root) in remove_proc_subtree()
773 pde_put(de); in remove_proc_subtree()
776 de = next; in remove_proc_subtree()
785 struct proc_dir_entry *de = PDE(inode); in proc_get_parent_data() local
786 return de->parent->data; in proc_get_parent_data()
790 void proc_remove(struct proc_dir_entry *de) in proc_remove() argument
792 if (de) in proc_remove()
793 remove_proc_subtree(de->name, de->parent); in proc_remove()