forked from luck/tmp_suning_uos_patched
vfs: fix user_statfs to retry once on ESTALE errors
Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
99a5df37a0
commit
96948fc606
|
@ -77,10 +77,17 @@ EXPORT_SYMBOL(vfs_statfs);
|
|||
int user_statfs(const char __user *pathname, struct kstatfs *st)
|
||||
{
|
||||
struct path path;
|
||||
int error = user_path_at(AT_FDCWD, pathname, LOOKUP_FOLLOW|LOOKUP_AUTOMOUNT, &path);
|
||||
int error;
|
||||
unsigned int lookup_flags = LOOKUP_FOLLOW|LOOKUP_AUTOMOUNT;
|
||||
retry:
|
||||
error = user_path_at(AT_FDCWD, pathname, lookup_flags, &path);
|
||||
if (!error) {
|
||||
error = vfs_statfs(&path, st);
|
||||
path_put(&path);
|
||||
if (retry_estale(error, lookup_flags)) {
|
||||
lookup_flags |= LOOKUP_REVAL;
|
||||
goto retry;
|
||||
}
|
||||
}
|
||||
return error;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user