Whamcloud - gitweb
LU-6356 ptlrpc: ret -ECONNREFUSED if not context found in req 43/14043/4
authorSebastien Buisson <sebastien.buisson@bull.net>
Wed, 11 Mar 2015 10:31:08 +0000 (11:31 +0100)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 26 Mar 2015 00:01:05 +0000 (00:01 +0000)
Return -ECONNREFUSED instead of -ENOMEM in sptlrpc_req_get_ctx()
if no context is found in req.
It it more graceful?

Signed-off-by: Sebastien Buisson <sebastien.buisson@bull.net>
Change-Id: If1b142199a94d1976093a7d26a05e49a63f50469
Reviewed-on: http://review.whamcloud.com/14043
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Andrew Perepechko <andrew.perepechko@seagate.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/ptlrpc/sec.c

index a3d6c65..4effd99 100644 (file)
@@ -436,10 +436,10 @@ int sptlrpc_req_get_ctx(struct ptlrpc_request *req)
 
         sptlrpc_sec_put(sec);
 
 
         sptlrpc_sec_put(sec);
 
-        if (!req->rq_cli_ctx) {
-                CERROR("req %p: fail to get context\n", req);
-                RETURN(-ENOMEM);
-        }
+       if (!req->rq_cli_ctx) {
+               CERROR("req %p: fail to get context\n", req);
+               RETURN(-ECONNREFUSED);
+       }
 
         RETURN(0);
 }
 
         RETURN(0);
 }