Author: stefan2
Date: Mon Jun 22 16:40:12 2015
New Revision: 1686897
URL: http://svn.apache.org/r1686897
Log:
On the fsx-1.10 branch:
Fix the first of 3 multi-threading issues with the batch fsync code.
* subversion/libsvn_fs_x/batch_fsync.c
(waitable_counter__increment): We must signal waiting threads *before*
releasing the mutex. A waiting thread
may destroy this object immediately after
we released the mutex.
Modified:
subversion/branches/fsx-1.10/subversion/libsvn_fs_x/batch_fsync.c
Modified: subversion/branches/fsx-1.10/subversion/libsvn_fs_x/batch_fsync.c
URL:
http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/libsvn_fs_x/batch_fsync.c?rev=1686897&r1=1686896&r2=1686897&view=diff
==============================================================================
--- subversion/branches/fsx-1.10/subversion/libsvn_fs_x/batch_fsync.c (original)
+++ subversion/branches/fsx-1.10/subversion/libsvn_fs_x/batch_fsync.c Mon Jun
22 16:40:12 2015
@@ -132,9 +132,9 @@ waitable_counter__increment(waitable_cou
{
SVN_ERR(svn_mutex__lock(counter->mutex));
counter->value++;
- SVN_ERR(svn_mutex__unlock(counter->mutex, SVN_NO_ERROR));
SVN_ERR(svn_thread_cond__broadcast(counter->cond));
+ SVN_ERR(svn_mutex__unlock(counter->mutex, SVN_NO_ERROR));
return SVN_NO_ERROR;
}