提交 0b75b35c 编写于 作者: T Trond Myklebust 提交者: Linus Torvalds

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

Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 c02d7adf
......@@ -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] == '/')
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册