aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Buisson <[email protected]>2016-10-02 22:28:04 -0400
committerGreg Kroah-Hartman <[email protected]>2016-10-16 10:24:25 +0200
commitbb0c9db9bee2ce86c66c51582a238cf76b8543d0 (patch)
tree1b7f708ba05c672a3bdbf0fc536b791c10dbfe73
parentcbd4d4a8e319050100db4e05d896cee65f011d25 (diff)
staging: lustre: ptlrpc: ret -ECONNREFUSED if not context found in req
Return -ECONNREFUSED instead of -ENOMEM in sptlrpc_req_get_ctx() if no context is found in req. It is more graceful. Signed-off-by: Sebastien Buisson <[email protected]> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6356 Reviewed-on: http://review.whamcloud.com/14043 Reviewed-by: Dmitry Eremin <[email protected]> Reviewed-by: Andrew Perepechko <[email protected]> Reviewed-by: Oleg Drokin <[email protected]> Signed-off-by: James Simmons <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
-rw-r--r--drivers/staging/lustre/lustre/ptlrpc/sec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/lustre/lustre/ptlrpc/sec.c b/drivers/staging/lustre/lustre/ptlrpc/sec.c
index a7416cd9ac71..12f02ed6a91d 100644
--- a/drivers/staging/lustre/lustre/ptlrpc/sec.c
+++ b/drivers/staging/lustre/lustre/ptlrpc/sec.c
@@ -379,7 +379,7 @@ int sptlrpc_req_get_ctx(struct ptlrpc_request *req)
if (!req->rq_cli_ctx) {
CERROR("req %p: fail to get context\n", req);
- return -ENOMEM;
+ return -ECONNREFUSED;
}
return 0;