linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton@redhat.com>
To: viro@ZenIV.linux.org.uk
Cc: linux-fsdevel@vger.kernel.org, miklos@szeredi.hu
Subject: [PATCH] vfs: remove warning about "weird" root dentry name from prepend_path()
Date: Mon, 14 Jan 2013 09:54:40 -0500	[thread overview]
Message-ID: <1358175280-15903-1-git-send-email-jlayton@redhat.com> (raw)
In-Reply-To: <20130110085905.07c1ab47@corrin.poochiereds.net>

We've had several reports of this warning over the last year or so:

[34011.669912] ------------[ cut here ]------------
[34011.670473] WARNING: at fs/dcache.c:2630 prepend_path+0x1eb/0x200()
[34011.671198] Hardware name: Bochs
[34011.671564] Root dentry has weird name <>  vfsmnt: fs:nfs4
[34011.672195] Modules linked in: nfsv4 auth_rpcgss nfs lockd sunrpc dns_resolver fscache kvm_amd kvm microcode virtio_net virtio_balloon i2c_piix4 cirrus drm_kms_helper ttm virtio_blk drm i2c_core
[34011.674464] Pid: 7470, comm: ls Tainted: G        W    3.7.0-6.fc19.x86_64 #1
[34011.675417] Call Trace:
[34011.675712]  [<ffffffff8106892f>] warn_slowpath_common+0x7f/0xc0
[34011.676404]  [<ffffffff81068a26>] warn_slowpath_fmt+0x46/0x50
[34011.677058]  [<ffffffff8109eb24>] ? lg_local_lock+0x44/0x80
[34011.677675]  [<ffffffff811e8f18>] ? prepend_path+0x38/0x200
[34011.678315]  [<ffffffff811e90cb>] prepend_path+0x1eb/0x200
[34011.678926]  [<ffffffff811e913c>] path_with_deleted+0x5c/0xa0
[34011.679578]  [<ffffffff811e976f>] d_path+0xbf/0x100
[34011.680139]  [<ffffffff81244bb5>] proc_pid_readlink+0x95/0x100
[34011.680783]  [<ffffffff811d8509>] sys_readlinkat+0xa9/0xc0
[34011.681418]  [<ffffffff81104a5c>] ? __audit_syscall_entry+0xcc/0x300
[34011.682144]  [<ffffffff811d853b>] sys_readlink+0x1b/0x20
[34011.682740]  [<ffffffff816fbd19>] system_call_fastpath+0x16/0x1b
[34011.683425] ---[ end trace 5e8c789abf4f6e53 ]---

I'm able to reproduce this warning at will by mounting up a NFS
filesystem, cd'ing into it. If I then lazy unmount the fs and then stat
/proc/pid/cwd for the process sitting in the detached mount, this
warning will fire.

Given that this is fairly easy to reproduce without doing anything too
exotic, I don't see much value in keeping this warning around.

Cc: Miklos Szeredi <miklos@szeredi.hu>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
---
 fs/dcache.c | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/fs/dcache.c b/fs/dcache.c
index 19153a0..08a10a7 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -2587,15 +2587,6 @@ out:
 	return error;
 
 global_root:
-	/*
-	 * Filesystems needing to implement special "root names"
-	 * should do so with ->d_dname()
-	 */
-	if (IS_ROOT(dentry) &&
-	    (dentry->d_name.len != 1 || dentry->d_name.name[0] != '/')) {
-		WARN(1, "Root dentry has weird name <%.*s>\n",
-		     (int) dentry->d_name.len, dentry->d_name.name);
-	}
 	if (!slash)
 		error = prepend(buffer, buflen, "/", 1);
 	if (!error)
-- 
1.7.11.7


  reply	other threads:[~2013-01-14 14:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-10 13:59 WARNING: at fs/dcache.c:2630 prepend_path+0x1eb/0x200() Jeff Layton
2013-01-14 14:54 ` Jeff Layton [this message]
2013-01-14 15:50   ` [PATCH] vfs: remove warning about "weird" root dentry name from prepend_path() Miklos Szeredi
     [not found]     ` <20130114142458.0c509320@tlielax.poochiereds.net>
2013-01-15  0:18       ` Jeff Layton

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=1358175280-15903-1-git-send-email-jlayton@redhat.com \
    --to=jlayton@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --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).