projects
/
platform
/
upstream
/
kernel-adaptation-pc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c02d7ad
)
NFS: Fix nfs_path() to always return a '/' at the beginning of the path
author
Trond Myklebust
<Trond.Myklebust@netapp.com>
Mon, 22 Jun 2009 19:09:14 +0000
(15:09 -0400)
committer
Linus Torvalds
<torvalds@linux-foundation.org>
Tue, 23 Jun 2009 04:28:25 +0000
(21:28 -0700)
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/nfs/namespace.c
patch
|
blob
|
history
diff --git
a/fs/nfs/namespace.c
b/fs/nfs/namespace.c
index
f01caec
..
40c7667
100644
(file)
--- a/
fs/nfs/namespace.c
+++ b/
fs/nfs/namespace.c
@@
-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] == '/')