vfs: spread struct mount - mnt_has_parent
[linux-2.6-block.git] / fs / dcache.c
index 64c8ce4c147fa9409df528312af5097fd0014c79..1834e715f814c29b279f822df72f1d8cc131b020 100644 (file)
@@ -2460,8 +2460,9 @@ static int prepend_path(const struct path *path,
                struct dentry * parent;
 
                if (dentry == vfsmnt->mnt_root || IS_ROOT(dentry)) {
+                       struct mount *mnt = real_mount(vfsmnt);
                        /* Global root? */
-                       if (!mnt_has_parent(vfsmnt))
+                       if (!mnt_has_parent(mnt))
                                goto global_root;
                        dentry = vfsmnt->mnt_mountpoint;
                        vfsmnt = vfsmnt->mnt_parent;