Lines Matching refs:dentry

187 static int proc_cwd_link(struct dentry *dentry, struct path *path)
189 struct task_struct *task = get_proc_task(d_inode(dentry));
204 static int proc_root_link(struct dentry *dentry, struct path *path)
206 struct task_struct *task = get_proc_task(d_inode(dentry));
690 int proc_setattr(struct mnt_idmap *idmap, struct dentry *dentry,
694 struct inode *inode = d_inode(dentry);
699 error = setattr_prepare(&nop_mnt_idmap, dentry, attr);
1719 static int proc_exe_link(struct dentry *dentry, struct path *exe_path)
1724 task = get_proc_task(d_inode(dentry));
1738 static const char *proc_pid_get_link(struct dentry *dentry,
1745 if (!dentry)
1752 error = PROC_I(inode)->op.proc_get_link(dentry, &path);
1785 static int proc_pid_readlink(struct dentry * dentry, char __user * buffer, int buflen)
1788 struct inode *inode = d_inode(dentry);
1795 error = PROC_I(inode)->op.proc_get_link(dentry, &path);
1926 * invalidate inode's dentry before being released.
1930 * can be released by invalidating '/proc/<tgid>' dentry.
1932 * invalidating '/proc/<tgid>' dentry, we reserve it to handle single
1934 * '/proc/<tgid>/task/<pid>' dentry before released.
1960 struct inode *inode = d_inode(path->dentry);
1985 /* dentry stuff */
2003 static int pid_revalidate(struct dentry *dentry, unsigned int flags)
2010 inode = d_inode_rcu(dentry);
2029 int pid_delete_dentry(const struct dentry *dentry)
2032 * If so, then don't put the dentry on the lru list,
2035 return proc_inode_is_dead(d_inode(dentry));
2062 struct dentry *child, *dir = file->f_path.dentry;
2075 struct dentry *res;
2095 * dname_to_vma_addr - maps a dentry name into two unsigned longs
2098 static int dname_to_vma_addr(struct dentry *dentry,
2101 const char *str = dentry->d_name.name;
2136 static int map_files_d_revalidate(struct dentry *dentry, unsigned int flags)
2148 inode = d_inode(dentry);
2157 if (!dname_to_vma_addr(dentry, &vm_start, &vm_end)) {
2187 static int map_files_get_link(struct dentry *dentry, struct path *path)
2196 task = get_proc_task(d_inode(dentry));
2205 rc = dname_to_vma_addr(dentry, &vm_start, &vm_end);
2240 proc_map_files_get_link(struct dentry *dentry,
2247 return proc_pid_get_link(dentry, inode, done);
2259 static struct dentry *
2260 proc_map_files_instantiate(struct dentry *dentry,
2267 inode = proc_pid_make_inode(dentry->d_sb, task, S_IFLNK |
2279 d_set_d_op(dentry, &tid_map_files_dentry_operations);
2280 return d_splice_alias(inode, dentry);
2283 static struct dentry *proc_map_files_lookup(struct inode *dir,
2284 struct dentry *dentry, unsigned int flags)
2289 struct dentry *result;
2302 if (dname_to_vma_addr(dentry, &vm_start, &vm_end))
2319 result = proc_map_files_instantiate(dentry, task,
2631 static struct dentry *proc_pident_instantiate(struct dentry *dentry,
2638 inode = proc_pid_make_inode(dentry->d_sb, task, p->mode);
2651 d_set_d_op(dentry, &pid_dentry_operations);
2652 return d_splice_alias(inode, dentry);
2655 static struct dentry *proc_pident_lookup(struct inode *dir,
2656 struct dentry *dentry,
2661 struct dentry *res = ERR_PTR(-ENOENT);
2671 if (p->len != dentry->d_name.len)
2673 if (!memcmp(dentry->d_name.name, p->name, p->len)) {
2674 res = proc_pident_instantiate(dentry, task, p);
2729 file->f_path.dentry->d_name.name,
2787 file->f_path.dentry->d_name.name, page,
2819 static struct dentry *proc_##LSM##_attr_dir_lookup(struct inode *dir, \
2820 struct dentry *dentry, unsigned int flags) \
2822 return proc_pident_lookup(dir, dentry, \
2878 static struct dentry *proc_attr_dir_lookup(struct inode *dir,
2879 struct dentry *dentry, unsigned int flags)
2881 return proc_pident_lookup(dir, dentry,
3384 static struct dentry *proc_tgid_base_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags)
3386 return proc_pident_lookup(dir, dentry,
3404 * the dentry cache.
3422 static struct dentry *proc_pid_instantiate(struct dentry * dentry,
3427 inode = proc_pid_make_base_inode(dentry->d_sb, task,
3439 d_set_d_op(dentry, &pid_dentry_operations);
3440 return d_splice_alias(inode, dentry);
3443 struct dentry *proc_pid_lookup(struct dentry *dentry, unsigned int flags)
3449 struct dentry *result = ERR_PTR(-ENOENT);
3451 tgid = name_to_int(&dentry->d_name);
3455 fs_info = proc_sb_info(dentry->d_sb);
3471 result = proc_pid_instantiate(dentry, task, NULL);
3709 static struct dentry *proc_tid_base_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags)
3711 return proc_pident_lookup(dir, dentry,
3728 static struct dentry *proc_task_instantiate(struct dentry *dentry,
3732 inode = proc_pid_make_base_inode(dentry->d_sb, task,
3744 d_set_d_op(dentry, &pid_dentry_operations);
3745 return d_splice_alias(inode, dentry);
3748 static struct dentry *proc_task_lookup(struct inode *dir, struct dentry * dentry, unsigned int flags)
3755 struct dentry *result = ERR_PTR(-ENOENT);
3760 tid = name_to_int(&dentry->d_name);
3764 fs_info = proc_sb_info(dentry->d_sb);
3776 result = proc_task_instantiate(dentry, task, NULL);
3906 struct inode *inode = d_inode(path->dentry);