Skip to content

Commit 93e3bce

Browse files
committed
vfs: Remove incorrect debugging WARN in prepend_path
The warning message in prepend_path is unclear and outdated. It was added as a warning that the mechanism for generating names of pseudo files had been removed from prepend_path and d_dname should be used instead. Unfortunately the warning reads like a general warning, making it unclear what to do with it. Remove the warning. The transition it was added to warn about is long over, and I added code several years ago which in rare cases causes the warning to fire on legitimate code, and the warning is now firing and scaring people for no good reason. Cc: stable@vger.kernel.org Reported-by: Ivan Delalande <colona@arista.com> Reported-by: Omar Sandoval <osandov@osandov.com> Fixes: f48cfdd ("vfs: In d_path don't call d_dname on a mount point") Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
1 parent 7236c85 commit 93e3bce

1 file changed

Lines changed: 0 additions & 11 deletions

File tree

‎fs/dcache.c‎

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2927,17 +2927,6 @@ static int prepend_path(const struct path *path,
29272927
vfsmnt = &mnt->mnt;
29282928
continue;
29292929
}
2930-
/*
2931-
* Filesystems needing to implement special "root names"
2932-
* should do so with ->d_dname()
2933-
*/
2934-
if (IS_ROOT(dentry) &&
2935-
(dentry->d_name.len != 1 ||
2936-
dentry->d_name.name[0] != '/')) {
2937-
WARN(1, "Root dentry has weird name <%.*s>\n",
2938-
(int) dentry->d_name.len,
2939-
dentry->d_name.name);
2940-
}
29412930
if (!error)
29422931
error = is_mounted(vfsmnt) ? 1 : 2;
29432932
break;

0 commit comments

Comments
 (0)