Re: rmdir(".") works, and causes havoc

Bill Hawes (whawes@star.net)
Mon, 04 Aug 1997 14:25:53 -0400


Linus Torvalds wrote:
> No, it's not really a religious issue at all, it's just that the new
> dcache code is so different from what any other unix does. And I haven't
> checked all the small details (some of the ones you mention I knew about,
> others were a nasty surprise that I hadn't thought about).

The rmdir(".") case reminds me of an anomaly I noticed recently. If you
mount a directory on top of your current directory, the results are,
well, very interesting. ls will show files that used to be there, and ls
-l will show the names of the files, but complain. Unless a file in the
old (covered up) directory has the same name as a file in the new
directory ...

Anyway, it's rather confusing and unexpected. Shouldn't such mounts
either be prohibited, or else the dentries of the covered up directories
hidden away until uncovered again?

Regards,
Bill