diff options
-rw-r--r-- | fs/statfs.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/fs/statfs.c b/fs/statfs.c index f8e832e6f0a2..c219e733f553 100644 --- a/fs/statfs.c +++ b/fs/statfs.c | |||
@@ -77,10 +77,17 @@ EXPORT_SYMBOL(vfs_statfs); | |||
77 | int user_statfs(const char __user *pathname, struct kstatfs *st) | 77 | int user_statfs(const char __user *pathname, struct kstatfs *st) |
78 | { | 78 | { |
79 | struct path path; | 79 | struct path path; |
80 | int error = user_path_at(AT_FDCWD, pathname, LOOKUP_FOLLOW|LOOKUP_AUTOMOUNT, &path); | 80 | int error; |
81 | unsigned int lookup_flags = LOOKUP_FOLLOW|LOOKUP_AUTOMOUNT; | ||
82 | retry: | ||
83 | error = user_path_at(AT_FDCWD, pathname, lookup_flags, &path); | ||
81 | if (!error) { | 84 | if (!error) { |
82 | error = vfs_statfs(&path, st); | 85 | error = vfs_statfs(&path, st); |
83 | path_put(&path); | 86 | path_put(&path); |
87 | if (retry_estale(error, lookup_flags)) { | ||
88 | lookup_flags |= LOOKUP_REVAL; | ||
89 | goto retry; | ||
90 | } | ||
84 | } | 91 | } |
85 | return error; | 92 | return error; |
86 | } | 93 | } |