linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan McGee <dpmcgee@gmail.com>
To: Alexander Viro <viro@zeniv.linux.org.uk>,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: dave@archlinux.org, tom@archlinux.org,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Trond Myklebust <Trond.Myklebust@netapp.com>
Subject: [PATCH] VFS: fix statfs() automounter semantics regression
Date: Tue,  1 Nov 2011 18:23:10 -0500	[thread overview]
Message-ID: <1320189791-21634-1-git-send-email-dpmcgee@gmail.com> (raw)

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.

Signed-off-by: Dan McGee <dpmcgee@gmail.com>
---
 fs/statfs.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/statfs.c b/fs/statfs.c
index 8244924..9cf04a1 100644
--- a/fs/statfs.c
+++ b/fs/statfs.c
@@ -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);
-- 
1.7.7.1

             reply	other threads:[~2011-11-01 23:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-01 23:23 Dan McGee [this message]
2011-11-01 23:23 ` [PATCH] VFS: fix statfs() automounter semantics regression Dan McGee

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1320189791-21634-1-git-send-email-dpmcgee@gmail.com \
    --to=dpmcgee@gmail.com \
    --cc=Trond.Myklebust@netapp.com \
    --cc=dave@archlinux.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tom@archlinux.org \
    --cc=torvalds@linux-foundation.org \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).