From 24bae9733cf16b3e14ae2b95ee27d259cbf05386 Mon Sep 17 00:00:00 2001 From: Jeff Layton Date: Tue, 11 Dec 2012 12:10:16 -0500 Subject: [PATCH] --- yaml --- r: 347862 b: refs/heads/master c: 3a3e159dbfe405517584b09bbcefd72115d93342 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/xattr.c | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 0de251a9d5e4..8a28c970d3ec 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 60e66b48ca20819d97ec4851007accc0b013985a +refs/heads/master: 3a3e159dbfe405517584b09bbcefd72115d93342 diff --git a/trunk/fs/xattr.c b/trunk/fs/xattr.c index 24833de649f8..c127d57bf655 100644 --- a/trunk/fs/xattr.c +++ b/trunk/fs/xattr.c @@ -505,12 +505,17 @@ SYSCALL_DEFINE4(lgetxattr, const char __user *, pathname, { struct path path; ssize_t error; - - error = user_lpath(pathname, &path); + unsigned int lookup_flags = 0; +retry: + error = user_path_at(AT_FDCWD, pathname, lookup_flags, &path); if (error) return error; error = getxattr(path.dentry, name, value, size); path_put(&path); + if (retry_estale(error, lookup_flags)) { + lookup_flags |= LOOKUP_REVAL; + goto retry; + } return error; }