From: Alex Zhuravlev Date: Tue, 24 Sep 2019 20:29:01 +0000 (+0300) Subject: LU-12799 ptlrpc: return proper error code X-Git-Tag: 2.12.90~17 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=refs%2Fchanges%2F82%2F36282%2F4;p=fs%2Flustre-release.git LU-12799 ptlrpc: return proper error code from ptlrpc_disconnect_prep_req() using ERR_PTR() as the callers expect. Fixes: 5a6ceb664f07 ("LU-7236 ptlrpc: idle connections can disconnect") Change-Id: I5493194a1f18f3d0b559921b7859bf835585ba58 Signed-off-by: Alex Zhuravlev Reviewed-on: https://review.whamcloud.com/36282 Reviewed-by: Andreas Dilger Tested-by: jenkins Reviewed-by: James Simmons Reviewed-by: Shaun Tancheff Tested-by: Maloo --- diff --git a/lustre/ptlrpc/import.c b/lustre/ptlrpc/import.c index b7ce038..baf05c1 100644 --- a/lustre/ptlrpc/import.c +++ b/lustre/ptlrpc/import.c @@ -1646,7 +1646,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