diff options
author | Jeff Layton <jlayton@redhat.com> | 2012-12-11 12:10:14 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-12-20 18:50:08 -0500 |
commit | a69201d6f08240f20a0d33a1b7273d1e7748791c (patch) | |
tree | 609495e85765dac924c69a229dde05ed1cc0baff /fs | |
parent | 96948fc6069b68380abac2944b8b02b43a2e2057 (diff) | |
download | linux-a69201d6f08240f20a0d33a1b7273d1e7748791c.tar.gz linux-a69201d6f08240f20a0d33a1b7273d1e7748791c.tar.bz2 linux-a69201d6f08240f20a0d33a1b7273d1e7748791c.zip |
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>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/utimes.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/utimes.c b/fs/utimes.c index bb0696a41735..f4fb7eca10e8 100644 --- a/fs/utimes.c +++ b/fs/utimes.c @@ -158,13 +158,17 @@ long do_utimes(int dfd, const char __user *filename, struct timespec *times, if (!(flags & AT_SYMLINK_NOFOLLOW)) lookup_flags |= LOOKUP_FOLLOW; - +retry: error = user_path_at(dfd, filename, lookup_flags, &path); if (error) goto out; error = utimes_common(&path, times); path_put(&path); + if (retry_estale(error, lookup_flags)) { + lookup_flags |= LOOKUP_REVAL; + goto retry; + } } out: |