diff options
author | Jeff Layton <jlayton@redhat.com> | 2012-12-11 12:10:13 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-12-20 18:50:07 -0500 |
commit | 14ff690c0f94cf2e37f7c448f4f09bf0b4006d62 (patch) | |
tree | 83c17757de4b9c7899360bca6328a2670cc14703 /fs/open.c | |
parent | 2771261ec5b677a38f0cd5fcfc6cefd5393787ef (diff) | |
download | op-kernel-dev-14ff690c0f94cf2e37f7c448f4f09bf0b4006d62.zip op-kernel-dev-14ff690c0f94cf2e37f7c448f4f09bf0b4006d62.tar.gz |
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/open.c')
-rw-r--r-- | fs/open.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -514,11 +514,16 @@ SYSCALL_DEFINE3(fchmodat, int, dfd, const char __user *, filename, umode_t, mode { struct path path; int error; - - error = user_path_at(dfd, filename, LOOKUP_FOLLOW, &path); + unsigned int lookup_flags = LOOKUP_FOLLOW; +retry: + error = user_path_at(dfd, filename, lookup_flags, &path); if (!error) { error = chmod_common(&path, mode); path_put(&path); + if (retry_estale(error, lookup_flags)) { + lookup_flags |= LOOKUP_REVAL; + goto retry; + } } return error; } |