Skip to content
Snippets Groups Projects
Commit 0b75b35c authored by Trond Myklebust's avatar Trond Myklebust Committed by Linus Torvalds
Browse files

NFS: Fix nfs_path() to always return a '/' at the beginning of the path

parent c02d7adf
No related branches found
No related tags found
No related merge requests found
......@@ -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] == '/')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment