]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blob - src/patches/suse-2.6.27.31/patches.fixes/nfs-04-Fix-nfs_path-to-always-return-a-slash-at-the-beginning-of-the-path
Reenabled linux-xen, added patches for Xen Kernel Version 2.6.27.31,
[people/teissler/ipfire-2.x.git] / src / patches / suse-2.6.27.31 / patches.fixes / nfs-04-Fix-nfs_path-to-always-return-a-slash-at-the-beginning-of-the-path
1 From 0b75b35c7cad33e7613f5adf28fa10fe8b09b1c3 Mon Sep 17 00:00:00 2001
2 From: Trond Myklebust <Trond.Myklebust@netapp.com>
3 Date: Mon, 22 Jun 2009 15:09:14 -0400
4 Subject: [PATCH 4/5] NFS: Fix nfs_path() to always return a '/' at the beginning of the path
5
6 Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
7 Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
8 Acked-by: NeilBrown <neilb@suse.de>
9 ---
10 fs/nfs/namespace.c | 5 +++++
11 1 file changed, 5 insertions(+)
12
13 --- linux-2.6.27-SLE11_BRANCH.orig/fs/nfs/namespace.c
14 +++ linux-2.6.27-SLE11_BRANCH/fs/nfs/namespace.c
15 @@ -65,6 +65,11 @@ char *nfs_path(const char *base,
16 dentry = dentry->d_parent;
17 }
18 spin_unlock(&dcache_lock);
19 + if (*end != '/') {
20 + if (--buflen < 0)
21 + goto Elong;
22 + *--end = '/';
23 + }
24 namelen = strlen(base);
25 /* Strip off excess slashes in base string */
26 while (namelen > 0 && base[namelen - 1] == '/')