X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=fs%2Fdcache.c;h=f7282ebf1a37dde6e6c62a80d6049c895dd4c36c;hb=f48cfddc6729ef133933062320039808bafa6f45;hp=4bdb300b16e2e940bab8eeb07417b7f87914815f;hpb=5c1f34c42d601908b6491ded11beab83ec9b5f8a;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git diff --git a/fs/dcache.c b/fs/dcache.c index 4bdb300..f7282eb 100644 --- a/fs/dcache.c +++ b/fs/dcache.c @@ -3061,8 +3061,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); rcu_read_lock();