ghudson@tigris.org wrote:
> Modified: trunk/subversion/libsvn_fs_fs/fs_fs.c
> Url: http://svn.collab.net/viewcvs/svn/trunk/subversion/libsvn_fs_fs/fs_fs.c?view=diff&rev=14066&p1=trunk/subversion/libsvn_fs_fs/fs_fs.c&r1=14065&p2=trunk/subversion/libsvn_fs_fs/fs_fs.c&r2=14066
> ==============================================================================
> --- trunk/subversion/libsvn_fs_fs/fs_fs.c (original)
> +++ trunk/subversion/libsvn_fs_fs/fs_fs.c Sat Apr 9 06:17:05 2005
> @@ -27,6 +27,7 @@
> #include <apr_file_io.h>
> #include <apr_uuid.h>
> #include <apr_md5.h>
> +#include <apr_thread_mutex.h>
>
> #include "svn_pools.h"
> #include "svn_fs.h"
> @@ -3679,11 +3680,28 @@
> apr_pool_t *subpool = svn_pool_create (pool);
> svn_error_t *err;
>
> +#if APR_HAS_THREADS
> + fs_fs_data_t *ffd = fs->fsap_data;
> + apr_status_t status;
> +
> + /* POSIX fcntl locks are per-process, so we need to serialize locks
> + within the process. */
> + status = apr_thread_mutex_lock (ffd->lock);
> + if (status)
> + return svn_error_wrap_apr (status, "Can't grab FSFS repository mutex");
> +#endif
> +
> SVN_ERR (get_write_lock (fs, subpool));
This has the potential to leave the mutex locked if get_write_lock
returns an error, doesn't it?
> err = body (baton, subpool);
>
> svn_pool_destroy (subpool);
> +
> +#if APR_HAS_THREADS
> + status = apr_thread_mutex_unlock (ffd->lock);
> + if (status && !err)
> + return svn_error_wrap_apr (status, "Can't ungrab FSFS repository mutex");
> +#endif
>
> return err;
> }
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: svn-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: svn-help@subversion.tigris.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Apr 9 16:54:32 2005