Skip to content

Commit ad93d62

Browse files
Dominique Martinetgregkh
authored andcommitted
9p/rdma: do not disconnect on down_interruptible EAGAIN
[ Upstream commit 8b894ad ] 9p/rdma would sometimes drop the connection and display errors in recv_done when the user does ^C. The errors were caused by recv buffers that were posted at the time of disconnect, and we just do not want to disconnect when down_interruptible is... interrupted. Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Dominique Martinet <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent 16977a9 commit ad93d62

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

net/9p/trans_rdma.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@ static int rdma_request(struct p9_client *client, struct p9_req_t *req)
454454

455455
err = post_recv(client, rpl_context);
456456
if (err) {
457-
p9_debug(P9_DEBUG_FCALL, "POST RECV failed\n");
457+
p9_debug(P9_DEBUG_ERROR, "POST RECV failed: %d\n", err);
458458
goto recv_error;
459459
}
460460
/* remove posted receive buffer from request structure */
@@ -523,7 +523,7 @@ static int rdma_request(struct p9_client *client, struct p9_req_t *req)
523523
recv_error:
524524
kfree(rpl_context);
525525
spin_lock_irqsave(&rdma->req_lock, flags);
526-
if (rdma->state < P9_RDMA_CLOSING) {
526+
if (err != -EINTR && rdma->state < P9_RDMA_CLOSING) {
527527
rdma->state = P9_RDMA_CLOSING;
528528
spin_unlock_irqrestore(&rdma->req_lock, flags);
529529
rdma_disconnect(rdma->cm_id);

0 commit comments

Comments
 (0)