Should mount --bind not follow symlinks?

Anthony Heading (anthony@magix.com.sg)
Mon, 12 Mar 2001 19:44:13 +0900


Hi,
My automounted dirs have up till now been symlinks, where
e.g. /opt/perl defaults to automounting /export/opt/perl/LATEST
which is a symlink.

This all worked OK until the 2.4(.2) automounter helpfully tries
to mount --bind /export/opt/perl/LATEST /opt/perl

And this errors with "mount: wrong fs type, ..." because it
seems the first arg to mount --bind mustn't be a symlink,
resulting in a "No such file" or similar error being returned
to the requester.

What is especially confusing is that if this whole thing
was kicked off with say ls /opt/perl/bin, the first attempt
returns "No such file or directory", but automount
then installs a symlink into /opt, so a second ls attempt
works fine.

Is this known about / to be expected? I can't see why
one of automount or mount or the underlying system call
shouldn't chase symlinks, but I know I might be missing
some reason why I shouldn't be attempting this.

Anthony
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/