rsockets: fix rsocket state when interrupted waiting for events
PATCH v5 3/4 rsockets: fix rsocket state when interrupted waiting for events
Note: This patch is reworked based on suggestions from Sean and Jason
Also attached the patch file for convenience
From: Sreedhar Kodali <[email protected]>
Date: Thu Sep 18 14:35:42 2014 +0530
While waiting for a completion event, rsocket state is incorrectly set to error when interrupted. Instead, the caller of get completion event should decide what to do with it based on errno. The fix is do not change the state to rs_error when errno is EINTR inside get completion event.
---
src/rsocket.c +1 -1
@@ -1976,7 +1976,7 @@ static int rs_get_cq_event(struct rsocket *rs) rs->unack_cqe =0 ; } rs->cq_armed =0 ; - }else if (errno !=EAGAIN ) { + }else if (!(errno ==EAGAIN || errno ==EINTR )) { rs->state = rs_error; }
commit 3cd51b727b58f2e3aa03d77e9c410a5488a09112
Author: Sreedhar Kodali <[email protected]> Date: Thu Sep 18 14:35:42 2014 +0530
While waiting for a completion event, rsocket state is incorrectly set to error when interrupted. Instead, the caller of get completion event should decide what to do with it based on errno. The fix is do not change the state to rs_error when errno is EINTR inside get completion event.
---
src/rsocket.c +1 -1
@@ -1976,7 +1976,7 @@ static int rs_get_cq_event(struct rsocket *rs) rs->unack_cqe =0 ; } rs->cq_armed =0 ; - }else if (errno !=EAGAIN ) { + }else if (!(errno ==EAGAIN || errno ==EINTR )) { rs->state = rs_error; }
A message that is not in the archive (sent off-list or not yet received): 3429fa019ebfb4a49bf1e670da8ae4fe-FJGp5E75HVmZamtmwQBW5tBPR1lH4CV8@public.gmane.org
Thanks - applied
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html