symbolic link bug with dentry code

Heiko Eissfeldt (heiko@colossus.escape.de)
Fri, 15 Aug 1997 12:48:20 +0200 (MEST)


Hi dear dentry hackers,

I noticed a problem with symbolic links in the
newer 2.1 kernels. Semantics seem to have changed.

Please note the following session:

>heiko@colossus:~ $ cd /usr/lib/emacs/19.29/etc
>sh: /usr/lib/emacs/19.29/etc: Not a directory

This works with 2.0.29.

>heiko@colossus:~ $ cd /
>heiko@colossus:/ $ ls -l /usr/lib/emacs/19.29/etc
>lrwxrwxrwx 1 root root 34 Feb 2 1996 /usr/lib/emacs/19.29/etc -> ../../../share/lib/emacs/19.29/etc

This is ok.

>heiko@colossus:/ $ ls -l /usr/lib/emacs/19.29/etc/
>lrwxrwxrwx 1 root root 34 Feb 2 1996 /usr/lib/emacs/19.29/etc/ -> ../../../share/lib/emacs/19.29/etc

This normally displays the content of the directory associated with
the symbolic link. Here it does not.

>heiko@colossus:/ $ cd /usr/lib/emacs/19.29/etc/
>sh: /usr/lib/emacs/19.29/etc/: Not a directory

Same as above.

>heiko@colossus:/ $ cd /usr/lib/emacs/19.29/
>heiko@colossus:/usr/lib/emacs/19.29 $ ls -ld etc
>lrwxrwxrwx 1 root root 34 Feb 2 1996 etc -> ../../../share/lib/emacs/19.29/etc
>heiko@colossus:/usr/lib/emacs/19.29 $ cd etc
>sh: etc: Not a directory

Same as above.

>heiko@colossus:/usr/lib/emacs/19.29 $ cd ../../../share/lib/emacs/19.29/etc

Symbolic link failed. Direct change directory worked.

>heiko@colossus:/usr/share/lib/emacs/19.29/etc $ ls -ld ../etc
>drwxr-xr-x 3 root root 8192 Feb 16 1996 ../etc
>heiko@colossus:/usr/share/lib/emacs/19.29/etc $ cd ..
>heiko@colossus:/usr/share/lib/emacs/19.29 $ ls -ld etc
>drwxr-xr-x 3 root root 8192 Feb 16 1996 etc

'etc' is a directory.

My guess is the '..' parts are not handled as before with respect
to symbolic links...

Best regards,
Heiko Eissfeldt