aboutsummaryrefslogtreecommitdiff
path: root/fs/dcache.c
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2014-01-27 14:57:25 +0000
committerMark Brown <broonie@linaro.org>2014-01-27 14:57:25 +0000
commit51ad557e21b8713f3abc286c14bca4ed01b8e56d (patch)
tree357ddab632db8023c5b534309269b20fd50346e3 /fs/dcache.c
parent9d069f462c65190c5116e750e7b376793cd32a15 (diff)
parent020abbc91120ddf052e2c303a8c598c3be4dc459 (diff)
Merge tag 'v3.10.28' into linux-linaro-lsklsk-14.01
This is the 3.10.28 stable release
Diffstat (limited to 'fs/dcache.c')
-rw-r--r--fs/dcache.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/dcache.c b/fs/dcache.c
index da89cdfb21a..9a59653d344 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -2686,8 +2686,13 @@ char *d_path(const struct path *path, char *buf, int buflen)
* thus don't need to be hashed. They also don't need a name until a
* user wants to identify the object in /proc/pid/fd/. The little hack
* below allows us to generate a name for these objects on demand:
+ *
+ * Some pseudo inodes are mountable. When they are mounted
+ * path->dentry == path->mnt->mnt_root. In that case don't call d_dname
+ * and instead have d_path return the mounted path.
*/
- if (path->dentry->d_op && path->dentry->d_op->d_dname)
+ if (path->dentry->d_op && path->dentry->d_op->d_dname &&
+ (!IS_ROOT(path->dentry) || path->dentry != path->mnt->mnt_root))
return path->dentry->d_op->d_dname(path->dentry, buf, buflen);
get_fs_root(current->fs, &root);