staging: lustre: ptlrpc: ret -ECONNREFUSED if not context found in req
authorSebastien Buisson <sebastien.buisson@bull.net>
Mon, 3 Oct 2016 02:28:04 +0000 (22:28 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 16 Oct 2016 08:24:25 +0000 (10:24 +0200)
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@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@intel.com>
Reviewed-by: Andrew Perepechko <andrew.perepechko@seagate.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/ptlrpc/sec.c

index a7416cd9ac71777424aee2101c5993b2447435d2..12f02ed6a91d31dc9a8136c46c771e6237a656d7 100644 (file)
@@ -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;