Skip to content

Commit 92b9836

Browse files
chuckleveramschuma-ntap
authored andcommitted
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 <[email protected]> Signed-off-by: Anna Schumaker <[email protected]>
1 parent 5d01410 commit 92b9836

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

net/sunrpc/xprtrdma/verbs.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1918,10 +1918,10 @@ rpcrdma_register_external(struct rpcrdma_mr_seg *seg,
19181918
break;
19191919

19201920
default:
1921-
return -1;
1921+
return -EIO;
19221922
}
19231923
if (rc)
1924-
return -1;
1924+
return rc;
19251925

19261926
return nsegs;
19271927
}

0 commit comments

Comments
 (0)