[haiku-commits] r37555 - haiku/trunk/src/system/kernel/fs

  • From: ingo_weinhold@xxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sat, 17 Jul 2010 18:11:56 +0200 (CEST)

Author: bonefish
Date: 2010-07-17 18:11:56 +0200 (Sat, 17 Jul 2010)
New Revision: 37555
Changeset: http://dev.haiku-os.org/changeset/37555

Modified:
   haiku/trunk/src/system/kernel/fs/vfs.cpp
Log:
Added detail to the comment about why we can't call the create() hook without
O_EXCL.


Modified: haiku/trunk/src/system/kernel/fs/vfs.cpp
===================================================================
--- haiku/trunk/src/system/kernel/fs/vfs.cpp    2010-07-17 16:00:48 UTC (rev 
37554)
+++ haiku/trunk/src/system/kernel/fs/vfs.cpp    2010-07-17 16:11:56 UTC (rev 
37555)
@@ -5144,12 +5144,13 @@
 
        // This is somewhat tricky: If the entry already exists, the FS 
responsible
        // for the directory might not necessarily also be the one responsible 
for
-       // the node the entry refers to. So we can actually never call the 
create()
-       // hook without O_EXCL. Instead we try to look the entry up first. If it
-       // already exists, we just open the node (unless O_EXCL), otherwise we 
call
-       // create() with O_EXCL. This introduces a race condition, since someone
-       // else might have created the entry in the meantime. We hope the 
respective
-       // FS returns the correct error code and retry (up to 3 times) again.
+       // the node the entry refers to (e.g. in case of mount points or 
FIFOs). So
+       // we can actually never call the create() hook without O_EXCL. Instead 
we
+       // try to look the entry up first. If it already exists, we just open 
the
+       // node (unless O_EXCL), otherwise we call create() with O_EXCL. This
+       // introduces a race condition, since someone else might have created 
the
+       // entry in the meantime. We hope the respective FS returns the correct
+       // error code and retry (up to 3 times) again.
 
        for (int i = 0; i < 3 && status != B_OK; i++) {
                // look the node up


Other related posts:

  • » [haiku-commits] r37555 - haiku/trunk/src/system/kernel/fs - ingo_weinhold