Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 347840
b: refs/heads/master
c: 836fb7e
h: refs/heads/master
v: v3
  • Loading branch information
Jeff Layton authored and Al Viro committed Dec 20, 2012
1 parent 829ff6e commit f095915
Show file tree
Hide file tree
Showing 2 changed files with 7 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: b9d6ba94b875192ef5e2dab92d72beea33b83c3d
refs/heads/master: 836fb7e7b978e5f3b8b52e40838ddc50264723f0
8 changes: 6 additions & 2 deletions trunk/fs/stat.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ int vfs_fstatat(int dfd, const char __user *filename, struct kstat *stat,
{
struct path path;
int error = -EINVAL;
int lookup_flags = 0;
unsigned int lookup_flags = 0;

if ((flag & ~(AT_SYMLINK_NOFOLLOW | AT_NO_AUTOMOUNT |
AT_EMPTY_PATH)) != 0)
Expand All @@ -84,13 +84,17 @@ int vfs_fstatat(int dfd, const char __user *filename, struct kstat *stat,
lookup_flags |= LOOKUP_FOLLOW;
if (flag & AT_EMPTY_PATH)
lookup_flags |= LOOKUP_EMPTY;

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

error = vfs_getattr(path.mnt, path.dentry, stat);
path_put(&path);
if (retry_estale(error, lookup_flags)) {
lookup_flags |= LOOKUP_REVAL;
goto retry;
}
out:
return error;
}
Expand Down

0 comments on commit f095915

Please sign in to comment.