aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/proc/base.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c
index 75b1979749a5..de07e959ff2f 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -2102,22 +2102,22 @@ static int proc_self_readlink(struct dentry *dentry, char __user *buffer,
2102 int buflen) 2102 int buflen)
2103{ 2103{
2104 struct pid_namespace *ns = dentry->d_sb->s_fs_info; 2104 struct pid_namespace *ns = dentry->d_sb->s_fs_info;
2105 pid_t tgid = task_tgid_nr_ns(current, ns); 2105 pid_t pid = task_pid_nr_ns(current, ns);
2106 char tmp[PROC_NUMBUF]; 2106 char tmp[PROC_NUMBUF];
2107 if (!tgid) 2107 if (!pid)
2108 return -ENOENT; 2108 return -ENOENT;
2109 sprintf(tmp, "%d", tgid); 2109 sprintf(tmp, "%d", pid);
2110 return vfs_readlink(dentry,buffer,buflen,tmp); 2110 return vfs_readlink(dentry,buffer,buflen,tmp);
2111} 2111}
2112 2112
2113static void *proc_self_follow_link(struct dentry *dentry, struct nameidata *nd) 2113static void *proc_self_follow_link(struct dentry *dentry, struct nameidata *nd)
2114{ 2114{
2115 struct pid_namespace *ns = dentry->d_sb->s_fs_info; 2115 struct pid_namespace *ns = dentry->d_sb->s_fs_info;
2116 pid_t tgid = task_tgid_nr_ns(current, ns); 2116 pid_t pid = task_pid_nr_ns(current, ns);
2117 char tmp[PROC_NUMBUF]; 2117 char tmp[PROC_NUMBUF];
2118 if (!tgid) 2118 if (!pid)
2119 return ERR_PTR(-ENOENT); 2119 return ERR_PTR(-ENOENT);
2120 sprintf(tmp, "%d", task_tgid_nr_ns(current, ns)); 2120 sprintf(tmp, "%d", pid);
2121 return ERR_PTR(vfs_follow_link(nd,tmp)); 2121 return ERR_PTR(vfs_follow_link(nd,tmp));
2122} 2122}
2123 2123