Skip to content

Commit

Permalink
vfs: allow utimensat() calls to retry once on an ESTALE error
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jeff Layton authored and Al Viro committed Dec 20, 2012
1 parent 96948fc commit a69201d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion fs/utimes.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit a69201d

Please sign in to comment.