Skip to content

Commit

Permalink
svcrdma: Fix return value in svc_rdma_send
Browse files Browse the repository at this point in the history
Fix the return value on close to -ENOTCONN so caller knows to free context.
Also if a thread is waiting for free SQ space, check for close when waking
to avoid posting WR to a closing transport.

Signed-off-by: Tom Tucker <tom@opengridcomputing.com>
  • Loading branch information
Tom Tucker committed May 19, 2008
1 parent dbcd00e commit 9d6347a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/sunrpc/xprtrdma/svc_rdma_transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -1002,7 +1002,7 @@ int svc_rdma_send(struct svcxprt_rdma *xprt, struct ib_send_wr *wr)
int ret;

if (test_bit(XPT_CLOSE, &xprt->sc_xprt.xpt_flags))
return 0;
return -ENOTCONN;

BUG_ON(wr->send_flags != IB_SEND_SIGNALED);
BUG_ON(((struct svc_rdma_op_ctxt *)(unsigned long)wr->wr_id)->wr_op !=
Expand Down

0 comments on commit 9d6347a

Please sign in to comment.