From: Kurt Wachmann (kw@dde.dk)
Date: 11/11/91


Subject: About mvdir and linking directories
Date: Mon, 11 Nov 1991 11:35:36 +0100
From: kw@dde.dk (Kurt Wachmann)

In reply to tytso@ATHENA.MIT.EDU:

You can let the system call rename() do the trick for you, and
forbid linking of directories - correct. If you forbid linking
of directories, you see if one directoy is an ancestor of the
other *by looking at the names*. That will take away your
race condition for free.

We do however still have to avoid concurrent directory moves
from the same source directory - and into the old tree.
open()'s etc. are ok (I think), they must be atomic, and will
fail or succeed depending on how far the rename() operation
has come.

Kind regards

Kurt \/\/achmann, M.Sc. EE/SE