From b24bbaa8ec9c2aa59fd26ad8b87099e368540e47 Mon Sep 17 00:00:00 2001 From: Jeff Layton Date: Tue, 11 Dec 2012 12:10:06 -0500 Subject: [PATCH] --- yaml --- r: 347841 b: refs/heads/master c: 7955119e02d9fdf78a39fba8073f19ca6152613e h: refs/heads/master i: 347839: 829ff6e9dd801c902bcf1abb00d18fa53003ff49 v: v3 --- [refs] | 2 +- trunk/fs/stat.c | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index cf943a860da5..a7ab57625dd2 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 836fb7e7b978e5f3b8b52e40838ddc50264723f0 +refs/heads/master: 7955119e02d9fdf78a39fba8073f19ca6152613e diff --git a/trunk/fs/stat.c b/trunk/fs/stat.c index d22199527880..14f45459c83d 100644 --- a/trunk/fs/stat.c +++ b/trunk/fs/stat.c @@ -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; @@ -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; }