@@ -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 ;
@@ -470,7 +472,6 @@ opal_common_ucx_wpmem_cmpswp_nb(opal_common_ucx_wpmem_t *mem, uint64_t compare,
470
472
rc = _periodical_flush_nb (mem , winfo , target );
471
473
if (OPAL_UNLIKELY (OPAL_SUCCESS != rc )){
472
474
MCA_COMMON_UCX_VERBOSE (1 , "_incr_and_check_inflight_ops failed: %d" , rc );
473
- return rc ;
474
475
}
475
476
476
477
opal_mutex_unlock (& winfo -> mutex );
@@ -503,14 +504,15 @@ opal_common_ucx_wpmem_post(opal_common_ucx_wpmem_t *mem, ucp_atomic_post_op_t op
503
504
if (OPAL_UNLIKELY (status != UCS_OK )) {
504
505
MCA_COMMON_UCX_ERROR ("ucp_atomic_post failed: %d" , status );
505
506
rc = OPAL_ERROR ;
507
+ goto out ;
506
508
}
507
509
508
510
rc = _periodical_flush_nb (mem , winfo , target );
509
511
if (OPAL_UNLIKELY (OPAL_SUCCESS != rc )){
510
512
MCA_COMMON_UCX_VERBOSE (1 , "_incr_and_check_inflight_ops failed: %d" , rc );
511
- return rc ;
512
513
}
513
514
515
+ out :
514
516
opal_mutex_unlock (& winfo -> mutex );
515
517
return rc ;
516
518
}
@@ -542,14 +544,15 @@ opal_common_ucx_wpmem_fetch(opal_common_ucx_wpmem_t *mem,
542
544
if (OPAL_UNLIKELY (status != UCS_OK )) {
543
545
MCA_COMMON_UCX_ERROR ("ucp_atomic_cswap64 failed: %d" , status );
544
546
rc = OPAL_ERROR ;
547
+ goto out ;
545
548
}
546
549
547
550
rc = _periodical_flush_nb (mem , winfo , target );
548
551
if (OPAL_UNLIKELY (OPAL_SUCCESS != rc )){
549
552
MCA_COMMON_UCX_VERBOSE (1 , "_incr_and_check_inflight_ops failed: %d" , rc );
550
- return rc ;
551
553
}
552
554
555
+ out :
553
556
opal_mutex_unlock (& winfo -> mutex );
554
557
555
558
return rc ;
@@ -593,7 +596,6 @@ opal_common_ucx_wpmem_fetch_nb(opal_common_ucx_wpmem_t *mem,
593
596
rc = _periodical_flush_nb (mem , winfo , target );
594
597
if (OPAL_UNLIKELY (OPAL_SUCCESS != rc )){
595
598
MCA_COMMON_UCX_VERBOSE (1 , "_incr_and_check_inflight_ops failed: %d" , rc );
596
- return rc ;
597
599
}
598
600
599
601
opal_mutex_unlock (& winfo -> mutex );
0 commit comments