From: Trond Myklebust <Trond.Myklebust@netapp.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-fsdevel@vger.kernel.org, viro@zeniv.linux.org.uk,
hch@infradead.org
Subject: [PATCH 3/4] NFS: Fix nfs_path() to always return a '/' at the beginning of the path
Date: Wed, 11 Mar 2009 15:50:42 -0400 [thread overview]
Message-ID: <189154bfc7f1671c1b161b0d7705d79a0fbbbb4e.1238525532.git.Trond.Myklebust@netapp.com> (raw)
In-Reply-To: <cover.1238525532.git.Trond.Myklebust@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
---
fs/nfs/namespace.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/fs/nfs/namespace.c b/fs/nfs/namespace.c
index 64a288e..63b2b19 100644
--- 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] == '/')
--
1.6.0.4
next prev parent reply other threads:[~2009-03-31 21:12 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-31 18:52 [PATCH 0/4] Allow NFS to use ordinary path lookup when mounting NFSv4 Trond Myklebust
2009-03-11 19:50 ` [PATCH 1/4] VFS: Add a VFS helper function vfs_remote_path_lookup() Trond Myklebust
2009-03-31 21:40 ` Linus Torvalds
2009-03-31 22:37 ` Trond Myklebust
2009-03-31 22:43 ` Linus Torvalds
2009-03-31 23:38 ` Trond Myklebust
2009-04-01 0:16 ` Linus Torvalds
2009-04-01 0:51 ` Trond Myklebust
2009-04-01 1:04 ` Linus Torvalds
2009-03-31 22:49 ` Trond Myklebust
2009-04-01 2:15 ` Al Viro
2009-04-01 13:06 ` Trond Myklebust
2009-03-11 19:50 ` [PATCH 2/4] NFSv4: Use vfs_path_lookup() instead of nfs4_path_walk() Trond Myklebust
2009-03-11 19:50 ` Trond Myklebust [this message]
2009-03-11 19:50 ` [PATCH 4/4] NFS: Correct the NFS mount path when following a referral Trond Myklebust
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=189154bfc7f1671c1b161b0d7705d79a0fbbbb4e.1238525532.git.Trond.Myklebust@netapp.com \
--to=trond.myklebust@netapp.com \
--cc=hch@infradead.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®