You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2016/01/21 20:45:10 UTC
svn commit: r1726075 -
/subversion/branches/parallel-put/subversion/libsvn_fs_fs/transaction.c
Author: stefan2
Date: Thu Jan 21 19:45:10 2016
New Revision: 1726075
URL: http://svn.apache.org/viewvc?rev=1726075&view=rev
Log:
On the parallel-put branch:
* subversion/libsvn_fs_fs/transaction.c
(svn_fs_fs__with_txn_auto_lock): Don't release the lock until after BODY
got executed.
Modified:
subversion/branches/parallel-put/subversion/libsvn_fs_fs/transaction.c
Modified: subversion/branches/parallel-put/subversion/libsvn_fs_fs/transaction.c
URL: http://svn.apache.org/viewvc/subversion/branches/parallel-put/subversion/libsvn_fs_fs/transaction.c?rev=1726075&r1=1726074&r2=1726075&view=diff
==============================================================================
--- subversion/branches/parallel-put/subversion/libsvn_fs_fs/transaction.c (original)
+++ subversion/branches/parallel-put/subversion/libsvn_fs_fs/transaction.c Thu Jan 21 19:45:10 2016
@@ -470,15 +470,16 @@ svn_fs_fs__with_txn_auto_lock(svn_fs_t *
*/
if (ffd->concurrent_txns)
{
+ svn_error_t *err1, *err2;
void *lockcookie;
SVN_ERR(lock_proto_rev(&lockcookie, fs, txn_id, scratch_pool));
- /* Now open the prototype revision file and seek to the end. */
- SVN_ERR(svn_error_compose_create(body(baton, scratch_pool),
- unlock_proto_rev(fs, txn_id,
- lockcookie,
- scratch_pool)));
+ /* Be sure to always unlock the transaction, regardless of BODY's
+ return value. */
+ err1 = body(baton, scratch_pool);
+ err2 = unlock_proto_rev(fs, txn_id, lockcookie, scratch_pool);
+ SVN_ERR(svn_error_compose_create(err1, err2));
}
else
{