> Something similar to:
> 
> if (cma_any_addr...) {
>    ret = rdma_translate_ip(..);
>    if (ret)
>       goto err1;
> 
>    mutex_lock
>    ret = cma_acquire_dev
>    mutex_unlock
>    if (ret)
>       goto err2;
> }
> 
> should work fine.

Actually that will not work, since the undo operation is for when the
next operation (cma_get_port()) fails after we did an acquire_dev,
and in that case the refcount needs to be dropped. So I am not
able to avoid using an extra flag to indicate that a ref was got some
time in the past, and drop it in the error path. I will send that out now.

Thanks,

- KK


_______________________________________________
openib-general mailing list
[email protected]
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to