Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 234267
b: refs/heads/master
c: 40b3913
h: refs/heads/master
i:
  234265: 82911af
  234263: b49ac7f
v: v3
  • Loading branch information
Al Viro committed Mar 14, 2011
1 parent 3a7fab0 commit fc5bf08
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 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: f374ed5fa8afed8590deaae5dc147422e0e1a6d9
refs/heads/master: 40b39136f07279fdc868a36cba050f4e84ce0ace
14 changes: 6 additions & 8 deletions trunk/fs/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -2320,11 +2320,12 @@ static struct file *path_openat(int dfd, const char *pathname,
struct path link = path;
struct inode *linki = link.dentry->d_inode;
void *cookie;
error = -ELOOP;
if (!(nd.flags & LOOKUP_FOLLOW))
goto exit_dput;
if (count++ == 32)
goto exit_dput;
if (!(nd.flags & LOOKUP_FOLLOW) || count++ == 32) {
path_put_conditional(&path, &nd);
path_put(&nd.path);
filp = ERR_PTR(-ELOOP);
break;
}
/*
* This is subtle. Instead of calling do_follow_link() we do
* the thing by hands. The reason is that this way we have zero
Expand Down Expand Up @@ -2355,9 +2356,6 @@ static struct file *path_openat(int dfd, const char *pathname,
release_open_intent(&nd);
return filp;

exit_dput:
path_put_conditional(&path, &nd);
path_put(&nd.path);
out_filp:
filp = ERR_PTR(error);
goto out;
Expand Down

0 comments on commit fc5bf08

Please sign in to comment.