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

H. Peter Anvin (hpa@transmeta.com)
16 Dec 1999 09:18:07 -0800


Followup to: <199912152330.QAA20355@vindaloo.ras.ucalgary.ca>
By author: Richard Gooch <rgooch@ras.ucalgary.ca>
In newsgroup: linux.dev.kernel
> >
> > Yes, so again. Everyone agrees, I think, that mount should follow
> > symlinks. Moreover, one expects a certain parallelism between the
> > behaviour of mount and umount. So umount should follow symlinks
> > until it comes to the mount point. Your problem is that the mount
> > point used to be an ordinary directory but now is overmounted by
> > a filesystem that has a symlink at the root.
>
> I really would like to see mount(8) *not* follow symlinks. If I have
> /dev/sda2 -> /dev/scsi/host0/bus0/target0/lun0/part2
>
> then the current behaviour yields a huge <df> output. If I mount
> /dev/sda2, then that's what I want to see in my <df> output.
>

This isn't a particularly good motivation, though (if anything it
indicates the /dev names have been made too verbose, and so noone will
use them -- the Solaris trap) What *is* important, however, is to
have umount(8) accept what is given to mount(8), even when the "user"
option is enabled etc.

There is also a race condition in mount/umount when using the "user"
option. The most sensible way of fixing it seems to be to have
fmount/fumount.

-hpa

-- 
<hpa@transmeta.com> at work, <hpa@zytor.com> in private!
"Unix gives you enough rope to shoot yourself in the foot."

- 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/