]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/dcache.c
Merge branch 'dma-buf-merge' of git://people.freedesktop.org/~airlied/linux
[karo-tx-linux.git] / fs / dcache.c
index 64c8ce4c147fa9409df528312af5097fd0014c79..9791b1e7eee467cb97f243c6311e5624944b38db 100644 (file)
@@ -2452,6 +2452,7 @@ static int prepend_path(const struct path *path,
 {
        struct dentry *dentry = path->dentry;
        struct vfsmount *vfsmnt = path->mnt;
+       struct mount *mnt = real_mount(vfsmnt);
        bool slash = false;
        int error = 0;
 
@@ -2461,10 +2462,11 @@ static int prepend_path(const struct path *path,
 
                if (dentry == vfsmnt->mnt_root || IS_ROOT(dentry)) {
                        /* Global root? */
-                       if (!mnt_has_parent(vfsmnt))
+                       if (!mnt_has_parent(mnt))
                                goto global_root;
-                       dentry = vfsmnt->mnt_mountpoint;
-                       vfsmnt = vfsmnt->mnt_parent;
+                       dentry = mnt->mnt_mountpoint;
+                       mnt = mnt->mnt_parent;
+                       vfsmnt = &mnt->mnt;
                        continue;
                }
                parent = dentry->d_parent;
@@ -2501,7 +2503,7 @@ global_root:
        if (!slash)
                error = prepend(buffer, buflen, "/", 1);
        if (!error)
-               error = vfsmnt->mnt_ns ? 1 : 2;
+               error = real_mount(vfsmnt)->mnt_ns ? 1 : 2;
        goto out;
 }