]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - fs/nfs/namespace.c
Merge branch 'dma-debug/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/joro...
[mv-sheeva.git] / fs / nfs / namespace.c
index 64a288ee046d027692f1dc395792609cfe1760aa..40c76678289168ed0cbbe3e653f58485a56003eb 100644 (file)
@@ -65,6 +65,11 @@ char *nfs_path(const char *base,
                dentry = dentry->d_parent;
        }
        spin_unlock(&dcache_lock);
+       if (*end != '/') {
+               if (--buflen < 0)
+                       goto Elong;
+               *--end = '/';
+       }
        namelen = strlen(base);
        /* Strip off excess slashes in base string */
        while (namelen > 0 && base[namelen - 1] == '/')
@@ -154,7 +159,7 @@ out_err:
        goto out;
 out_follow:
        while (d_mountpoint(nd->path.dentry) &&
-              follow_down(&nd->path.mnt, &nd->path.dentry))
+              follow_down(&nd->path))
                ;
        err = 0;
        goto out;