don't pass nameidata to ->follow_link()
its only use is getting passed to nd_jump_link(), which can obtain it from current->nameidata Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
@@ -1380,7 +1380,7 @@ static int proc_exe_link(struct dentry *dentry, struct path *exe_path)
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
static const char *proc_pid_follow_link(struct dentry *dentry, void **cookie, struct nameidata *nd)
|
||||
static const char *proc_pid_follow_link(struct dentry *dentry, void **cookie)
|
||||
{
|
||||
struct inode *inode = d_inode(dentry);
|
||||
struct path path;
|
||||
@@ -1394,7 +1394,7 @@ static const char *proc_pid_follow_link(struct dentry *dentry, void **cookie, st
|
||||
if (error)
|
||||
goto out;
|
||||
|
||||
nd_jump_link(nd, &path);
|
||||
nd_jump_link(&path);
|
||||
return NULL;
|
||||
out:
|
||||
return ERR_PTR(error);
|
||||
|
@@ -393,7 +393,7 @@ static const struct file_operations proc_reg_file_ops_no_compat = {
|
||||
};
|
||||
#endif
|
||||
|
||||
static const char *proc_follow_link(struct dentry *dentry, void **cookie, struct nameidata *nd)
|
||||
static const char *proc_follow_link(struct dentry *dentry, void **cookie)
|
||||
{
|
||||
struct proc_dir_entry *pde = PDE(d_inode(dentry));
|
||||
if (unlikely(!use_pde(pde)))
|
||||
|
@@ -30,7 +30,7 @@ static const struct proc_ns_operations *ns_entries[] = {
|
||||
&mntns_operations,
|
||||
};
|
||||
|
||||
static const char *proc_ns_follow_link(struct dentry *dentry, void **cookie, struct nameidata *nd)
|
||||
static const char *proc_ns_follow_link(struct dentry *dentry, void **cookie)
|
||||
{
|
||||
struct inode *inode = d_inode(dentry);
|
||||
const struct proc_ns_operations *ns_ops = PROC_I(inode)->ns_ops;
|
||||
@@ -45,7 +45,7 @@ static const char *proc_ns_follow_link(struct dentry *dentry, void **cookie, str
|
||||
if (ptrace_may_access(task, PTRACE_MODE_READ)) {
|
||||
error = ns_get_path(&ns_path, task, ns_ops);
|
||||
if (!error)
|
||||
nd_jump_link(nd, &ns_path);
|
||||
nd_jump_link(&ns_path);
|
||||
}
|
||||
put_task_struct(task);
|
||||
return error;
|
||||
|
@@ -18,7 +18,7 @@ static int proc_self_readlink(struct dentry *dentry, char __user *buffer,
|
||||
return readlink_copy(buffer, buflen, tmp);
|
||||
}
|
||||
|
||||
static const char *proc_self_follow_link(struct dentry *dentry, void **cookie, struct nameidata *nd)
|
||||
static const char *proc_self_follow_link(struct dentry *dentry, void **cookie)
|
||||
{
|
||||
struct pid_namespace *ns = dentry->d_sb->s_fs_info;
|
||||
pid_t tgid = task_tgid_nr_ns(current, ns);
|
||||
|
@@ -19,7 +19,7 @@ static int proc_thread_self_readlink(struct dentry *dentry, char __user *buffer,
|
||||
return readlink_copy(buffer, buflen, tmp);
|
||||
}
|
||||
|
||||
static const char *proc_thread_self_follow_link(struct dentry *dentry, void **cookie, struct nameidata *nd)
|
||||
static const char *proc_thread_self_follow_link(struct dentry *dentry, void **cookie)
|
||||
{
|
||||
struct pid_namespace *ns = dentry->d_sb->s_fs_info;
|
||||
pid_t tgid = task_tgid_nr_ns(current, ns);
|
||||
|
Reference in New Issue
Block a user