Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 347853
b: refs/heads/master
c: 0291c0a
h: refs/heads/master
i:
  347851: bf4d7ad
v: v3
  • Loading branch information
Jeff Layton authored and Al Viro committed Dec 20, 2012
1 parent 6de6817 commit d1c0f7e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 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: 87fa55952b7347175c6e2f03874869ad2c055adb
refs/heads/master: 0291c0a551d5b0856627f2cb294da05f122414a0
9 changes: 7 additions & 2 deletions trunk/fs/open.c
Original file line number Diff line number Diff line change
Expand Up @@ -394,8 +394,9 @@ SYSCALL_DEFINE1(chdir, const char __user *, filename)
{
struct path path;
int error;

error = user_path_dir(filename, &path);
unsigned int lookup_flags = LOOKUP_FOLLOW | LOOKUP_DIRECTORY;
retry:
error = user_path_at(AT_FDCWD, filename, lookup_flags, &path);
if (error)
goto out;

Expand All @@ -407,6 +408,10 @@ SYSCALL_DEFINE1(chdir, const char __user *, filename)

dput_and_out:
path_put(&path);
if (retry_estale(error, lookup_flags)) {
lookup_flags |= LOOKUP_REVAL;
goto retry;
}
out:
return error;
}
Expand Down

0 comments on commit d1c0f7e

Please sign in to comment.