Skip to content

Commit

Permalink
vfs: make lremovexattr retry once on ESTALE error
Browse files Browse the repository at this point in the history
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
jtlayton authored and Al Viro committed Dec 20, 2012
1 parent 12f0621 commit b729d75
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions fs/xattr.c
Original file line number Diff line number Diff line change
Expand Up @@ -668,8 +668,9 @@ SYSCALL_DEFINE2(lremovexattr, const char __user *, pathname,
{
struct path path;
int error;

error = user_lpath(pathname, &path);
unsigned int lookup_flags = 0;
retry:
error = user_path_at(AT_FDCWD, pathname, lookup_flags, &path);
if (error)
return error;
error = mnt_want_write(path.mnt);
Expand All @@ -678,6 +679,10 @@ SYSCALL_DEFINE2(lremovexattr, const char __user *, pathname,
mnt_drop_write(path.mnt);
}
path_put(&path);
if (retry_estale(error, lookup_flags)) {
lookup_flags |= LOOKUP_REVAL;
goto retry;
}
return error;
}

Expand Down

0 comments on commit b729d75

Please sign in to comment.