summaryrefslogtreecommitdiffstats
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 a0c4ba6c6e57..7c6b4ec83cb7 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,
int buflen)
{
struct pid_namespace *ns = dentry->d_sb->s_fs_info;
- pid_t pid = task_pid_nr_ns(current, ns);
+ pid_t tgid = task_tgid_nr_ns(current, ns);
char tmp[PROC_NUMBUF];
- if (!pid)
+ if (!tgid)
return -ENOENT;
- sprintf(tmp, "%d", pid);
+ sprintf(tmp, "%d", tgid);
return vfs_readlink(dentry,buffer,buflen,tmp);
}
static void *proc_self_follow_link(struct dentry *dentry, struct nameidata *nd)
{
struct pid_namespace *ns = dentry->d_sb->s_fs_info;
- pid_t pid = task_pid_nr_ns(current, ns);
+ pid_t tgid = task_tgid_nr_ns(current, ns);
char tmp[PROC_NUMBUF];
- if (!pid)
+ if (!tgid)
return ERR_PTR(-ENOENT);
- sprintf(tmp, "%d", pid);
+ sprintf(tmp, "%d", task_tgid_nr_ns(current, ns));
return ERR_PTR(vfs_follow_link(nd,tmp));
}
OpenPOWER on IntegriCloud