Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/winsup
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2009-11-18 23:05:46 +0300
committerCorinna Vinschen <corinna@vinschen.de>2009-11-18 23:05:46 +0300
commit9fa63f7a5eee67e4c0eeb56d9927cae4da926abe (patch)
treed3c3e67bd94fb29848231d308a8c07cec75fa28e /winsup
parentb425cbf482350bd4a7ca3d60d6cf0e5b3f74fde1 (diff)
* flock.cc (fhandler_disk_file::lock): Disable a shortcut from the
original BSD code, but keep it in and documented why we can't use it.
Diffstat (limited to 'winsup')
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/flock.cc6
2 files changed, 11 insertions, 0 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 8ec0a07da..b1dad3552 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,10 @@
2009-11-18 Corinna Vinschen <corinna@vinschen.de>
+ * flock.cc (fhandler_disk_file::lock): Disable a shortcut from the
+ original BSD code, but keep it in and documented why we can't use it.
+
+2009-11-18 Corinna Vinschen <corinna@vinschen.de>
+
* ntea.cc (read_ea): Always add length of "user." prefix, not only
on Samba. Change comment.
diff --git a/winsup/cygwin/flock.cc b/winsup/cygwin/flock.cc
index 92b03d51e..11a2a5731 100644
--- a/winsup/cygwin/flock.cc
+++ b/winsup/cygwin/flock.cc
@@ -767,8 +767,13 @@ fhandler_disk_file::lock (int a_op, struct __flock64 *fl)
lockf_t **head = &node->i_lockf;
+#if 0
/*
* Avoid the common case of unlocking when inode_t has no locks.
+ *
+ * This shortcut is invalid for Cygwin because the above inode_t::get
+ * call returns with an empty lock list if this process has no locks
+ * on the file yet.
*/
if (*head == NULL)
{
@@ -779,6 +784,7 @@ fhandler_disk_file::lock (int a_op, struct __flock64 *fl)
return 0;
}
}
+#endif
/*
* Allocate a spare structure in case we have to split.
*/