summaryrefslogtreecommitdiff
path: root/net/sunrpc
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2014-11-09 04:14:12 +0300
committerAnna Schumaker <Anna.Schumaker@Netapp.com>2014-11-25 21:39:20 +0300
commit92b98361f119a6919061d067c6584de9ae2de9f4 (patch)
tree9f6466c599b9a4134fa4dd4159236470dd96e881 /net/sunrpc
parent5d01410fe4d92081f349b013a2e7a95429e4f2c9 (diff)
downloadlinux-92b98361f119a6919061d067c6584de9ae2de9f4.tar.xz
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>
Diffstat (limited to 'net/sunrpc')
-rw-r--r--net/sunrpc/xprtrdma/verbs.c4
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,
break;
default:
- return -1;
+ return -EIO;
}
if (rc)
- return -1;
+ return rc;
return nsegs;
}