@@ -376,14 +376,15 @@ opal_common_ucx_wpmem_putget(opal_common_ucx_wpmem_t *mem, opal_common_ucx_op_t
376
376
if (OPAL_UNLIKELY (status != UCS_OK && status != UCS_INPROGRESS )) {
377
377
MCA_COMMON_UCX_ERROR ("%s failed: %d" , called_func , status );
378
378
rc = OPAL_ERROR ;
379
+ goto out ;
379
380
}
380
381
381
382
rc = _periodical_flush_nb (mem , winfo , target );
382
383
if (OPAL_UNLIKELY (OPAL_SUCCESS != rc )){
383
384
MCA_COMMON_UCX_VERBOSE (1 , "_incr_and_check_inflight_ops failed: %d" , rc );
384
- return rc ;
385
385
}
386
386
387
+ out :
387
388
opal_mutex_unlock (& winfo -> mutex );
388
389
389
390
return rc ;
@@ -416,14 +417,15 @@ opal_common_ucx_wpmem_cmpswp(opal_common_ucx_wpmem_t *mem, uint64_t compare,
416
417
if (OPAL_UNLIKELY (status != UCS_OK )) {
417
418
MCA_COMMON_UCX_ERROR ("opal_common_ucx_atomic_cswap failed: %d" , status );
418
419
rc = OPAL_ERROR ;
420
+ goto out ;
419
421
}
420
422
421
423
rc = _periodical_flush_nb (mem , winfo , target );
422
424
if (OPAL_UNLIKELY (OPAL_SUCCESS != rc )){
423
425
MCA_COMMON_UCX_VERBOSE (1 , "_incr_and_check_inflight_ops failed: %d" , rc );
424
- return rc ;
425
426
}
426
427
428
+ out :
427
429
opal_mutex_unlock (& winfo -> mutex );
428
430
429
431
return rc ;
@@ -502,14 +504,15 @@ opal_common_ucx_wpmem_post(opal_common_ucx_wpmem_t *mem, ucp_atomic_post_op_t op
502
504
if (OPAL_UNLIKELY (status != UCS_OK )) {
503
505
MCA_COMMON_UCX_ERROR ("ucp_atomic_post failed: %d" , status );
504
506
rc = OPAL_ERROR ;
507
+ goto out ;
505
508
}
506
509
507
510
rc = _periodical_flush_nb (mem , winfo , target );
508
511
if (OPAL_UNLIKELY (OPAL_SUCCESS != rc )){
509
512
MCA_COMMON_UCX_VERBOSE (1 , "_incr_and_check_inflight_ops failed: %d" , rc );
510
- return rc ;
511
513
}
512
514
515
+ out :
513
516
opal_mutex_unlock (& winfo -> mutex );
514
517
return rc ;
515
518
}
@@ -541,14 +544,15 @@ opal_common_ucx_wpmem_fetch(opal_common_ucx_wpmem_t *mem,
541
544
if (OPAL_UNLIKELY (status != UCS_OK )) {
542
545
MCA_COMMON_UCX_ERROR ("ucp_atomic_cswap64 failed: %d" , status );
543
546
rc = OPAL_ERROR ;
547
+ goto out ;
544
548
}
545
549
546
550
rc = _periodical_flush_nb (mem , winfo , target );
547
551
if (OPAL_UNLIKELY (OPAL_SUCCESS != rc )){
548
552
MCA_COMMON_UCX_VERBOSE (1 , "_incr_and_check_inflight_ops failed: %d" , rc );
549
- return rc ;
550
553
}
551
554
555
+ out :
552
556
opal_mutex_unlock (& winfo -> mutex );
553
557
554
558
return rc ;
@@ -592,7 +596,6 @@ opal_common_ucx_wpmem_fetch_nb(opal_common_ucx_wpmem_t *mem,
592
596
rc = _periodical_flush_nb (mem , winfo , target );
593
597
if (OPAL_UNLIKELY (OPAL_SUCCESS != rc )){
594
598
MCA_COMMON_UCX_VERBOSE (1 , "_incr_and_check_inflight_ops failed: %d" , rc );
595
- return rc ;
596
599
}
597
600
598
601
opal_mutex_unlock (& winfo -> mutex );
0 commit comments