diff --git a/[refs] b/[refs] index 4b197af1193e..e078f075f16d 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 7ae6bdbd9b9d42da53ea809875c0a6cda3de694c +refs/heads/master: 98dc568bc2ebefe4c0cb315a7fb7eff8bbb43176 diff --git a/trunk/fs/dcache.c b/trunk/fs/dcache.c index 995d08069d26..f1809e6b9fda 100644 --- a/trunk/fs/dcache.c +++ b/trunk/fs/dcache.c @@ -1970,9 +1970,15 @@ char *__d_path(const struct path *path, struct path *root, return retval; global_root: - retval += 1; /* hit the slash */ - if (prepend_name(&retval, &buflen, &dentry->d_name) != 0) - goto Elong; + /* + * 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); + } root->mnt = vfsmnt; root->dentry = dentry; goto out;