Created
September 3, 2018 06:12
-
-
Save naota/261c74c6dfdf19f76bdc58e829d99ae5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int user_statfs(const char __user *pathname, struct kstatfs *st) | |
{ | |
struct path 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; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment