From d199146479d8353dd60a8de7650f317060e0cbcb Mon Sep 17 00:00:00 2001 From: Jeff Layton Date: Tue, 11 Dec 2012 12:10:16 -0500 Subject: [PATCH] --- yaml --- r: 347861 b: refs/heads/master c: 60e66b48ca20819d97ec4851007accc0b013985a h: refs/heads/master i: 347859: 40bb619940677b280c8de8a0962612ed6a0930c2 v: v3 --- [refs] | 2 +- trunk/fs/xattr.c | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index b8d095d3ba2e..0de251a9d5e4 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 49e09e1cc576daa99ea22f3a3c699062c34f8c0f +refs/heads/master: 60e66b48ca20819d97ec4851007accc0b013985a diff --git a/trunk/fs/xattr.c b/trunk/fs/xattr.c index 74d36e063c8d..24833de649f8 100644 --- a/trunk/fs/xattr.c +++ b/trunk/fs/xattr.c @@ -486,12 +486,17 @@ SYSCALL_DEFINE4(getxattr, const char __user *, pathname, { struct path path; ssize_t error; - - error = user_path(pathname, &path); + unsigned int lookup_flags = LOOKUP_FOLLOW; +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; }