From 939d8bb0cf88babe1b9812bc03e07d7811bf2770 Mon Sep 17 00:00:00 2001 From: Alex Zhuravlev Date: Tue, 24 Sep 2019 23:29:01 +0300 Subject: [PATCH] LU-12799 ptlrpc: return proper error code from ptlrpc_disconnect_prep_req() using ERR_PTR() as the callers expect. Lustre-change: https://review.whamcloud.com/36282 Lustre-commit: 9e2620d75cce1e1b4855704ddd9a994ce8e8d650 Fixes: 5a6ceb664f07 ("LU-7236 ptlrpc: idle connections can disconnect") Change-Id: I5493194a1f18f3d0b559921b7859bf835585ba58 Signed-off-by: Alex Zhuravlev Reviewed-by: Andreas Dilger Reviewed-by: James Simmons Reviewed-by: Shaun Tancheff Reviewed-on: https://review.whamcloud.com/37164 Reviewed-by: Shaun Tancheff Tested-by: jenkins Tested-by: Maloo --- lustre/ptlrpc/import.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lustre/ptlrpc/import.c b/lustre/ptlrpc/import.c index 2e8e53e..206ebc9 100644 --- a/lustre/ptlrpc/import.c +++ b/lustre/ptlrpc/import.c @@ -1632,7 +1632,7 @@ static struct ptlrpc_request *ptlrpc_disconnect_prep_req(struct obd_import *imp) req = ptlrpc_request_alloc_pack(imp, &RQF_MDS_DISCONNECT, LUSTRE_OBD_VERSION, rq_opc); if (req == NULL) - RETURN(NULL); + RETURN(ERR_PTR(-ENOMEM)); /* We are disconnecting, do not retry a failed DISCONNECT rpc if * it fails. We can get through the above with a down server -- 1.8.3.1