diff options
-rw-r--r-- | fs/dcache.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/fs/dcache.c b/fs/dcache.c index 995d08069d26..f1809e6b9fda 100644 --- a/fs/dcache.c +++ b/fs/dcache.c | |||
@@ -1970,9 +1970,15 @@ out: | |||
1970 | return retval; | 1970 | return retval; |
1971 | 1971 | ||
1972 | global_root: | 1972 | global_root: |
1973 | retval += 1; /* hit the slash */ | 1973 | /* |
1974 | if (prepend_name(&retval, &buflen, &dentry->d_name) != 0) | 1974 | * Filesystems needing to implement special "root names" |
1975 | goto Elong; | 1975 | * should do so with ->d_dname() |
1976 | */ | ||
1977 | if (IS_ROOT(dentry) && | ||
1978 | (dentry->d_name.len != 1 || dentry->d_name.name[0] != '/')) { | ||
1979 | WARN(1, "Root dentry has weird name <%.*s>\n", | ||
1980 | (int) dentry->d_name.len, dentry->d_name.name); | ||
1981 | } | ||
1976 | root->mnt = vfsmnt; | 1982 | root->mnt = vfsmnt; |
1977 | root->dentry = dentry; | 1983 | root->dentry = dentry; |
1978 | goto out; | 1984 | goto out; |