Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 312932
b: refs/heads/master
c: 408ef01
h: refs/heads/master
v: v3
  • Loading branch information
Christoph Hellwig authored and Al Viro committed Jul 14, 2012
1 parent 99ff91b commit a44b848
Show file tree
Hide file tree
Showing 3 changed files with 10 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: ac481d6ca4081bdd348cbd84963d1ece843a3407
refs/heads/master: 408ef013cc9e2f94a14f7ccbbe52ddfb18437a99
3 changes: 1 addition & 2 deletions trunk/fs/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,7 @@ follow_link(struct path *link, struct nameidata *nd, void **p)
*p = dentry->d_inode->i_op->follow_link(dentry, nd);
error = PTR_ERR(*p);
if (IS_ERR(*p))
goto out_put_link;
goto out_put_nd_path;

error = 0;
s = nd_get_link(nd);
Expand All @@ -646,7 +646,6 @@ follow_link(struct path *link, struct nameidata *nd, void **p)

out_put_nd_path:
path_put(&nd->path);
out_put_link:
path_put(link);
return error;
}
Expand Down
12 changes: 8 additions & 4 deletions trunk/fs/proc/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -1427,16 +1427,20 @@ static int proc_exe_link(struct dentry *dentry, struct path *exe_path)
static void *proc_pid_follow_link(struct dentry *dentry, struct nameidata *nd)
{
struct inode *inode = dentry->d_inode;
struct path path;
int error = -EACCES;

/* We don't need a base pointer in the /proc filesystem */
path_put(&nd->path);

/* Are we allowed to snoop on the tasks file descriptors? */
if (!proc_fd_access_allowed(inode))
goto out;

error = PROC_I(inode)->op.proc_get_link(dentry, &nd->path);
error = PROC_I(inode)->op.proc_get_link(dentry, &path);
if (error)
goto out;

path_put(&nd->path);
nd->path = path;
return NULL;
out:
return ERR_PTR(error);
}
Expand Down

0 comments on commit a44b848

Please sign in to comment.