aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2012-12-11 12:10:13 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2012-12-20 18:50:07 -0500
commit14ff690c0f94cf2e37f7c448f4f09bf0b4006d62 (patch)
tree83c17757de4b9c7899360bca6328a2670cc14703 /fs
parent2771261ec5b677a38f0cd5fcfc6cefd5393787ef (diff)
vfs: make fchmodat retry once on ESTALE errors
Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs')
-rw-r--r--fs/open.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/fs/open.c b/fs/open.c
index a13a54d3e691..99c3ce5f897b 100644
--- a/fs/open.c
+++ b/fs/open.c
@@ -514,11 +514,16 @@ SYSCALL_DEFINE3(fchmodat, int, dfd, const char __user *, filename, umode_t, mode
514{ 514{
515 struct path path; 515 struct path path;
516 int error; 516 int error;
517 517 unsigned int lookup_flags = LOOKUP_FOLLOW;
518 error = user_path_at(dfd, filename, LOOKUP_FOLLOW, &path); 518retry:
519 error = user_path_at(dfd, filename, lookup_flags, &path);
519 if (!error) { 520 if (!error) {
520 error = chmod_common(&path, mode); 521 error = chmod_common(&path, mode);
521 path_put(&path); 522 path_put(&path);
523 if (retry_estale(error, lookup_flags)) {
524 lookup_flags |= LOOKUP_REVAL;
525 goto retry;
526 }
522 } 527 }
523 return error; 528 return error;
524} 529}