Skip to content

Commit

Permalink
Merge pull request #2969 from cgwalters/fix-sync-pthreads
Browse files Browse the repository at this point in the history
deploy: Fix mutex locking for global sync timeout
  • Loading branch information
jmarrero authored Aug 4, 2023
2 parents a31f779 + 402e042 commit 7f70614
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/libostree/ostree-sysroot-deploy.c
Original file line number Diff line number Diff line change
Expand Up @@ -1606,11 +1606,10 @@ static void *
sync_in_thread (void *ptr)
{
SyncData *syncdata = ptr;
// Ensure that the caller is blocked waiting
g_mutex_lock (&syncdata->mutex);
ot_journal_print (LOG_INFO, "Starting global sync()");
sync ();
ot_journal_print (LOG_INFO, "Completed global sync()");
g_mutex_lock (&syncdata->mutex);
// Signal success
syncdata->success = true;
g_cond_broadcast (&syncdata->cond);
Expand Down

0 comments on commit 7f70614

Please sign in to comment.