On Jul 9, 12:27am, Rhialto wrote: } On Mon 06 Jul 2015 at 09:58:59 +0000, David Holland wrote: } } > Also it's occasionally useful to mount over things and leave a process } > underneath, which this logic seems to complicate. } } If I read the code correctly, it looks for processes that have a current } working directory or root directory exactly at the mount point. But the } mount point directory does not need to be empty. A process could have a } cwd or root in any directory inside it. So as-is, the code is } insufficient for its intended purpose anyway. } } Furthermore, the process can have open files from that directory tree. } If its cwd or root gets changed (and into what exactly, if it isn't the } exact mount point?) it has files open that it can't find anymore with } another call to open(2). That seems like an inconsistency that we may } want to avoid due to the POLA.
The same process or another process could unlink the open file. There is no guarantee of being to open(2) a file twice. }-- End of excerpt from Rhialto