Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 84618
b: refs/heads/master
c: c6caeb7
h: refs/heads/master
v: v3
  • Loading branch information
Eric W. Biederman authored and Linus Torvalds committed Feb 8, 2008
1 parent a85c32c commit d3f6ea4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 488e5bc4560d0b510c1ddc451c51a6cc14e3a930
refs/heads/master: c6caeb7c4544608e8ae62731334661fc396c7f85
12 changes: 6 additions & 6 deletions trunk/fs/proc/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 tgid = task_tgid_nr_ns(current, ns);
pid_t pid = task_pid_nr_ns(current, ns);
char tmp[PROC_NUMBUF];
if (!tgid)
if (!pid)
return -ENOENT;
sprintf(tmp, "%d", tgid);
sprintf(tmp, "%d", pid);
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 tgid = task_tgid_nr_ns(current, ns);
pid_t pid = task_pid_nr_ns(current, ns);
char tmp[PROC_NUMBUF];
if (!tgid)
if (!pid)
return ERR_PTR(-ENOENT);
sprintf(tmp, "%d", task_tgid_nr_ns(current, ns));
sprintf(tmp, "%d", pid);
return ERR_PTR(vfs_follow_link(nd,tmp));
}

Expand Down

0 comments on commit d3f6ea4

Please sign in to comment.