diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2014-11-08 20:14:12 -0500 |
---|---|---|
committer | Anna Schumaker <Anna.Schumaker@Netapp.com> | 2014-11-25 13:39:20 -0500 |
commit | 92b98361f119a6919061d067c6584de9ae2de9f4 (patch) | |
tree | 9f6466c599b9a4134fa4dd4159236470dd96e881 | |
parent | 5d01410fe4d92081f349b013a2e7a95429e4f2c9 (diff) |
xprtrdma: Return an errno from rpcrdma_register_external()
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>
-rw-r--r-- | net/sunrpc/xprtrdma/verbs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/sunrpc/xprtrdma/verbs.c b/net/sunrpc/xprtrdma/verbs.c index 61c41298b4ea..6ea29420f0ac 100644 --- a/net/sunrpc/xprtrdma/verbs.c +++ b/net/sunrpc/xprtrdma/verbs.c | |||
@@ -1918,10 +1918,10 @@ rpcrdma_register_external(struct rpcrdma_mr_seg *seg, | |||
1918 | break; | 1918 | break; |
1919 | 1919 | ||
1920 | default: | 1920 | default: |
1921 | return -1; | 1921 | return -EIO; |
1922 | } | 1922 | } |
1923 | if (rc) | 1923 | if (rc) |
1924 | return -1; | 1924 | return rc; |
1925 | 1925 | ||
1926 | return nsegs; | 1926 | return nsegs; |
1927 | } | 1927 | } |