[lustre-devel] [PATCH 08/41] staging: lustre: ptlrpc: ret -ECONNREFUSED if not context found in req

James Simmons jsimmons at infradead.org
Sun Oct 2 19:28:04 PDT 2016


From: Sebastien Buisson <sebastien.buisson at bull.net>

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 <sebastien.buisson at bull.net>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6356
Reviewed-on: http://review.whamcloud.com/14043
Reviewed-by: Dmitry Eremin <dmitry.eremin at intel.com>
Reviewed-by: Andrew Perepechko <andrew.perepechko at seagate.com>
Reviewed-by: Oleg Drokin <oleg.drokin at intel.com>
Signed-off-by: James Simmons <jsimmons at infradead.org>
---
 drivers/staging/lustre/lustre/ptlrpc/sec.c |    2 +-
 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 5d3995d..1457a6e 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;
-- 
1.7.1



More information about the lustre-devel mailing list