Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b729d75d authored by Jeff Layton's avatar Jeff Layton Committed by Al Viro
Browse files

vfs: make lremovexattr retry once on ESTALE error

parent 12f06212
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -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);
@@ -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;
}