Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

udf: Treat symlink component of type 2 as /

Currently, we ignore symlink component of type 2. But mkisofs and other OS'
seem to treat it as / so do the same for compatibility.

Reported-by: "Gábor S." <otnaccess@hotmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>

Jan Kara fef2e9f3 d2eb8c35

+10 -4
+10 -4
fs/udf/symlink.c
··· 41 41 pc = (struct pathComponent *)(from + elen); 42 42 switch (pc->componentType) { 43 43 case 1: 44 - if (pc->lengthComponentIdent == 0) { 45 - p = to; 46 - *p++ = '/'; 47 - } 44 + /* 45 + * Symlink points to some place which should be agreed 46 + * upon between originator and receiver of the media. Ignore. 47 + */ 48 + if (pc->lengthComponentIdent > 0) 49 + break; 50 + /* Fall through */ 51 + case 2: 52 + p = to; 53 + *p++ = '/'; 48 54 break; 49 55 case 3: 50 56 memcpy(p, "../", 3);