mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
vfs: fix user_statfs to retry once on ESTALE errors
Signed-off-by: Jeff Layton <[email protected]> Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
parent
99a5df37a0
commit
96948fc606
1 changed files with 8 additions and 1 deletions
|
|
@ -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 a new issue