diff --git a/ompi/mca/osc/rdma/osc_rdma_active_target.c b/ompi/mca/osc/rdma/osc_rdma_active_target.c index 7f17373ab8b..9858151fa67 100644 --- a/ompi/mca/osc/rdma/osc_rdma_active_target.c +++ b/ompi/mca/osc/rdma/osc_rdma_active_target.c @@ -429,14 +429,14 @@ int ompi_osc_rdma_complete_atomic (ompi_win_t *win) OSC_RDMA_VERBOSE(MCA_BASE_VERBOSE_TRACE, "complete: %s", win->w_name); OPAL_THREAD_LOCK(&module->lock); - if (0 == sync->num_peers) { + if (OMPI_OSC_RDMA_SYNC_TYPE_PSCW != sync->type) { OPAL_THREAD_UNLOCK(&module->lock); - return OMPI_SUCCESS; + return OMPI_ERR_RMA_SYNC; } - if (OMPI_OSC_RDMA_SYNC_TYPE_PSCW != sync->type) { + if (0 == sync->num_peers) { OPAL_THREAD_UNLOCK(&module->lock); - return OMPI_ERR_RMA_SYNC; + return OMPI_SUCCESS; } /* phase 1 cleanup sync object */