Re: [PATCH] Minor sys_umount fix (changes semantics slightly)

Guest section DW (dwguest@win.tue.nl)
Wed, 15 Dec 1999 21:44:22 +0100


> > Also, think of the very common case where people mount a CDROM
> > on /dev/cdrom which is a symlink to /dev/sr0 or /dev/hdc or so.
>
> Huh? That's not the issue. The issue is:
>
> I use:
> mount /cdrom
> ls /cdrom
> umount /cdrom
> while:
> ls -l /cdrom
> lrwxrwxrwx 1 root root 9 Oct 18 20:46 cdrom -> mnt/cdrom
>

I am not sure what you are saying here.
The issue is, "should the umount system call follow symlinks?".

Now if in this example the umount system call is executed for
the path "/cdrom" (which it isnt for the mount/umount that I maintain,
but that is beside the point, the question is what the kernel should do)
then it should follow symlinks in order to reach the mount point.
But that makes Malcolm unhappy, because his filesystem has a symlink
at the root, and umount would happily continue following symlinks
past the mount point.

As it is, umount can be called with both a mount point and a special device.
But it would be unworkable to have the behaviour depend on the type of argument;
that type is known first after following the symlinks.
So, really, we want to follow symlinks in all cases, I think.

Andries

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