Skip to content

Commit 5c8a0fb

Browse files
toofishestorvalds
authored andcommitted
VFS: fix statfs() automounter semantics regression
No one in their right mind would expect statfs() to not work on a automounter managed mount point. Fix it. [ I'm not sure about the "no one in their right mind" part. It's not mounted, and you didn't ask for it to be mounted. But nobody will really care, and this probably makes it match previous semantics, so.. - Linus ] This mirrors the fix made to the quota code in 815d405. Signed-off-by: Dan McGee <dpmcgee@gmail.com> Cc: Trond Myklebust <Trond.Myklebust@netapp.com> Cc: Alexander Viro <viro@zeniv.linux.org.uk> Cc: stable@kernel.org Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent fba9569 commit 5c8a0fb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎fs/statfs.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ EXPORT_SYMBOL(vfs_statfs);
7676
int user_statfs(const char __user *pathname, struct kstatfs *st)
7777
{
7878
struct path path;
79-
int error = user_path(pathname, &path);
79+
int error = user_path_at(AT_FDCWD, pathname, LOOKUP_FOLLOW|LOOKUP_AUTOMOUNT, &path);
8080
if (!error) {
8181
error = vfs_statfs(&path, st);
8282
path_put(&path);

0 commit comments

Comments
 (0)