From: Sebastien Buisson Date: Mon, 3 Oct 2016 02:28:04 +0000 (-0400) Subject: staging: lustre: ptlrpc: ret -ECONNREFUSED if not context found in req X-Git-Tag: v4.10-rc1~148^2~782 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=bb0c9db9bee2ce86c66c51582a238cf76b8543d0;p=karo-tx-linux.git 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 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6356 Reviewed-on: http://review.whamcloud.com/14043 Reviewed-by: Dmitry Eremin Reviewed-by: Andrew Perepechko Reviewed-by: Oleg Drokin Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman --- 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;