mount / unmount and mountcheckdirs()

Konstantin Belousov kostikbel at gmail.com
Fri Sep 15 10:30:43 UTC 2017


On Fri, Sep 15, 2017 at 11:08:31AM +0100, Edward Napierala wrote:
> 2017-09-15 10:20 GMT+01:00 Konstantin Belousov <kostikbel at gmail.com>:
> > I believe that the current autofs does not allow a process to get into
> > this situation at all.
> >
> 
> It does.  For example:
> 
> [trasz at v2:~]% cd /media/md0
> [trasz at v2:/media/md0]% mount
> /dev/ada0s1a on / (ufs, local, noatime, journaled soft-updates)
> devfs on /dev (devfs, local, multilabel)
> map -hosts on /net (autofs)
> map -media on /media (autofs)
> [trasz at v2:/media/md0]% ls
> [trasz at v2:/media/md0]% mount
> /dev/ada0s1a on / (ufs, local, noatime, journaled soft-updates)
> devfs on /dev (devfs, local, multilabel)
> map -hosts on /net (autofs)
> map -media on /media (autofs)
> /dev/md0 on /media/md0 (ufs, local, noatime, nosuid, automounted)
> 
> Getting rid of mountcheckdirs() in the unmount path should be fine, I think.
How the example proves that mountcheckdirs() can be removed ?  How can
we see which directory content was printed by ls, the covered or mounted ?



More information about the freebsd-fs mailing list