aboutsummaryrefslogtreecommitdiff
path: root/fs/udf/symlink.c
diff options
context:
space:
mode:
authorSteve French <sfrench@us.ibm.com>2012-01-13 23:59:13 -0600
committerSteve French <sfrench@us.ibm.com>2012-01-13 23:59:13 -0600
commitdcd169b761d52e3f9122e30442b83863bdf1d9d9 (patch)
tree5e79741f1865a3aef840e68d7db9e7ed4d685b5a /fs/udf/symlink.c
parentaaf015890754d58dcb71a4aa44ed246bb082bcf6 (diff)
parent7250170c9ed00f3b74b11b98afefab45020672dd (diff)
Merge branch 'master' of git+ssh://git.samba.org/data/git/sfrench/cifs-2.6
Diffstat (limited to 'fs/udf/symlink.c')
-rw-r--r--fs/udf/symlink.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/fs/udf/symlink.c b/fs/udf/symlink.c
index b1d4488b0f14..d7c6dbe4194b 100644
--- a/fs/udf/symlink.c
+++ b/fs/udf/symlink.c
@@ -41,10 +41,16 @@ static void udf_pc_to_char(struct super_block *sb, unsigned char *from,
pc = (struct pathComponent *)(from + elen);
switch (pc->componentType) {
case 1:
- if (pc->lengthComponentIdent == 0) {
- p = to;
- *p++ = '/';
- }
+ /*
+ * Symlink points to some place which should be agreed
+ * upon between originator and receiver of the media. Ignore.
+ */
+ if (pc->lengthComponentIdent > 0)
+ break;
+ /* Fall through */
+ case 2:
+ p = to;
+ *p++ = '/';
break;
case 3:
memcpy(p, "../", 3);