Commit a69201d6f08240f20a0d33a1b7273d1e7748791c
Committed by
Al Viro
1 parent
96948fc606
Exists in
master
and in
20 other branches
vfs: allow utimensat() calls to retry once on an ESTALE error
Clearly, we can't handle the NULL filename case, but we can deal with the case where there's a real pathname. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Showing 1 changed file with 5 additions and 1 deletions Side-by-side Diff
fs/utimes.c
... | ... | @@ -158,13 +158,17 @@ |
158 | 158 | |
159 | 159 | if (!(flags & AT_SYMLINK_NOFOLLOW)) |
160 | 160 | lookup_flags |= LOOKUP_FOLLOW; |
161 | - | |
161 | +retry: | |
162 | 162 | error = user_path_at(dfd, filename, lookup_flags, &path); |
163 | 163 | if (error) |
164 | 164 | goto out; |
165 | 165 | |
166 | 166 | error = utimes_common(&path, times); |
167 | 167 | path_put(&path); |
168 | + if (retry_estale(error, lookup_flags)) { | |
169 | + lookup_flags |= LOOKUP_REVAL; | |
170 | + goto retry; | |
171 | + } | |
168 | 172 | } |
169 | 173 | |
170 | 174 | out: |