lkml.org 
[lkml]   [2000]   [Nov]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [BUG] Inconsistent behaviour of rmdir


On Thu, 16 Nov 2000, Jean-Marc Saffroy wrote:

> Now I see your point : by "." or "foo/." you mean the directory itself,
> while "foo" or "foo/" refer to the link to the directory, and they are
> obviously different objects... at least since hard links on directories
> were introduced. Fine.

Sorry, no. Directories still have only one parent. However, "." _is_ a
link. It's not a shortcut or something like that - it's a real, normal,
honest-to-$DEITY directory entry. Aka link.

> Ok, now I get it. Thanks for this much clearer explanation.
>
> I guess that this was not a problem in 2.2 precisely because hard links on
> directories were forbidden, right ?

That was a problem and that still _is_ a problem - these races are unsolvable
without a pretty serious namei.c rewrite and unless Alan is willing to go
for that in 2.2 they are there to stay.

As for the hard links being forbidden - in some sense they never were, in
some sense they still are. Situation didn't change - directory can't have
more than one parent. OTOH, every directory has at least two links - from
the parent and from itself (+ one from each child).

> > Besides, we clearly violated
> > all relevant standards - rmdir() and rename() are required to fail
> > if the last component of name happens to "." or "..".
>
> By standard, do you imply 'de facto' ? Or does any source clearly state
> this ?

POSIX, for one thing.

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

\
 
 \ /
  Last update: 2005-03-22 13:21    [from the cache]
©2003-2011 Jasper Spaans