Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 347841
b: refs/heads/master
c: 7955119
h: refs/heads/master
i:
  347839: 829ff6e
v: v3
  • Loading branch information
Jeff Layton authored and Al Viro committed Dec 20, 2012
1 parent f095915 commit b24bbaa
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 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: 836fb7e7b978e5f3b8b52e40838ddc50264723f0
refs/heads/master: 7955119e02d9fdf78a39fba8073f19ca6152613e
8 changes: 7 additions & 1 deletion trunk/fs/stat.c
Original file line number Diff line number Diff line change
Expand Up @@ -300,11 +300,13 @@ SYSCALL_DEFINE4(readlinkat, int, dfd, const char __user *, pathname,
struct path path;
int error;
int empty = 0;
unsigned int lookup_flags = LOOKUP_EMPTY;

if (bufsiz <= 0)
return -EINVAL;

error = user_path_at_empty(dfd, pathname, LOOKUP_EMPTY, &path, &empty);
retry:
error = user_path_at_empty(dfd, pathname, lookup_flags, &path, &empty);
if (!error) {
struct inode *inode = path.dentry->d_inode;

Expand All @@ -318,6 +320,10 @@ SYSCALL_DEFINE4(readlinkat, int, dfd, const char __user *, pathname,
}
}
path_put(&path);
if (retry_estale(error, lookup_flags)) {
lookup_flags |= LOOKUP_REVAL;
goto retry;
}
}
return error;
}
Expand Down

0 comments on commit b24bbaa

Please sign in to comment.