Bug-fix: preventing completing the same RMA request twice.
It is possible that a request handler of RMA request is called for the second time inside the first called request handler on the same request. Consider the following case: a req is queued up in Nemesis SHM queue with ref count of 2: one is for request completion and another is for dequeueing from SHM queue. The first called req handler completed this request and decrement ref count to 1. This request is still in the queue. However, within this handler, we trigger the same req handler on the same request again (for example making progress on SHM queue), and the second called handler also tries to complete this request, which leads to the wrong execution. In this patch we check if request has already been completed when entering the req handler, to prevent processing the same request twice. We also move the function finish_op_on_target() (where the same req handler can be triggered again) after request completion routine, so that we can mark the current request as completed before enter the same req handler for the second time. Fix #2204 Signed-off-by: Pavan Balaji <firstname.lastname@example.org>