Skip to contentSkip to conversation

VFS: fix statfs() automounter semantics regression

PATCH New Dan McGee 1 participant 2 messages Nov 1, 2011 VFS

lore
Share & tools
lore

Dan McGee

author
#0 lore raw

PATCH 1/1 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.

This mirrors the fix made to the quota code in 815d405ceff0d69646.

---
 fs/statfs.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
fs/statfs.c +1 -1
index 8244924..9cf04a1 100644
@@ -76,7 +76,7 @@ EXPORT_SYMBOL(vfs_statfs);
 int user_statfs(const char __user *pathname, struct kstatfs *st)
 {
 	struct path path;
-	int error = user_path(pathname, &path);
+	int error = user_path_at(AT_FDCWD, pathname, LOOKUP_FOLLOW|LOOKUP_AUTOMOUNT, &path);
 	if (!error) {
 		error = vfs_statfs(&path, st);
 		path_put(&path);
Signature · 1 line
1.7.7.1
author
#1 lore raw

PATCH 1/1 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.

This mirrors the fix made to the quota code in 815d405ceff0d69646.

---
 fs/statfs.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
fs/statfs.c +1 -1
index 8244924..9cf04a1 100644
@@ -76,7 +76,7 @@ EXPORT_SYMBOL(vfs_statfs);
 int user_statfs(const char __user *pathname, struct kstatfs *st)
 {
 	struct path path;
-	int error = user_path(pathname, &path);
+	int error = user_path_at(AT_FDCWD, pathname, LOOKUP_FOLLOW|LOOKUP_AUTOMOUNT, &path);
 	if (!error) {
 		error = vfs_statfs(&path, st);
 		path_put(&path);
Signature · 1 line
1.7.7.1