Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 347852
b: refs/heads/master
c: 87fa559
h: refs/heads/master
v: v3
  • Loading branch information
Jeff Layton authored and Al Viro committed Dec 20, 2012
1 parent bf4d7ad commit 6de6817
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: 48f7530d3f722617aa7cfea62b09b0c1a8d0173e
refs/heads/master: 87fa55952b7347175c6e2f03874869ad2c055adb
9 changes: 7 additions & 2 deletions trunk/fs/open.c
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,7 @@ SYSCALL_DEFINE3(faccessat, int, dfd, const char __user *, filename, int, mode)
struct path path;
struct inode *inode;
int res;
unsigned int lookup_flags = LOOKUP_FOLLOW;

if (mode & ~S_IRWXO) /* where's F_OK, X_OK, W_OK, R_OK? */
return -EINVAL;
Expand All @@ -338,8 +339,8 @@ SYSCALL_DEFINE3(faccessat, int, dfd, const char __user *, filename, int, mode)
}

old_cred = override_creds(override_cred);

res = user_path_at(dfd, filename, LOOKUP_FOLLOW, &path);
retry:
res = user_path_at(dfd, filename, lookup_flags, &path);
if (res)
goto out;

Expand Down Expand Up @@ -374,6 +375,10 @@ SYSCALL_DEFINE3(faccessat, int, dfd, const char __user *, filename, int, mode)

out_path_release:
path_put(&path);
if (retry_estale(res, lookup_flags)) {
lookup_flags |= LOOKUP_REVAL;
goto retry;
}
out:
revert_creds(old_cred);
put_cred(override_cred);
Expand Down

0 comments on commit 6de6817

Please sign in to comment.