Skip to content

Commit

Permalink
xprtrdma: Return an errno from rpcrdma_register_external()
Browse files Browse the repository at this point in the history
The RPC/RDMA send_request method and the chunk registration code
expects an errno from the registration function. This allows
the upper layers to distinguish between a recoverable failure
(for example, temporary memory exhaustion) and a hard failure
(for example, a bug in the registration logic).

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
  • Loading branch information
Chuck Lever authored and Anna Schumaker committed Nov 25, 2014
1 parent 5d01410 commit 92b9836
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/sunrpc/xprtrdma/verbs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1918,10 +1918,10 @@ rpcrdma_register_external(struct rpcrdma_mr_seg *seg,
break;

default:
return -1;
return -EIO;
}
if (rc)
return -1;
return rc;

return nsegs;
}
Expand Down

0 comments on commit 92b9836

Please sign in to comment.