From 07c552e69f28ddfa74c225e18fd41ff81852a661 Mon Sep 17 00:00:00 2001 From: Jeff Layton Date: Tue, 11 Dec 2012 12:10:15 -0500 Subject: [PATCH] --- yaml --- r: 347860 b: refs/heads/master c: 49e09e1cc576daa99ea22f3a3c699062c34f8c0f 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 37e31b706cc5..b8d095d3ba2e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 68f1bb8bb89e0bb813c893a42373a26ebdab7f9c +refs/heads/master: 49e09e1cc576daa99ea22f3a3c699062c34f8c0f diff --git a/trunk/fs/xattr.c b/trunk/fs/xattr.c index c5e90d2d751f..74d36e063c8d 100644 --- a/trunk/fs/xattr.c +++ b/trunk/fs/xattr.c @@ -394,8 +394,9 @@ SYSCALL_DEFINE5(lsetxattr, const char __user *, pathname, { struct path path; int 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 = mnt_want_write(path.mnt); @@ -404,6 +405,10 @@ SYSCALL_DEFINE5(lsetxattr, const char __user *, pathname, mnt_drop_write(path.mnt); } path_put(&path); + if (retry_estale(error, lookup_flags)) { + lookup_flags |= LOOKUP_REVAL; + goto retry; + } return error; }