From: Jeremy Filizetti Date: Sun, 29 Jan 2017 00:04:36 +0000 (-0500) Subject: staging: lustre: ldlm: Restore connect flags on failure X-Git-Tag: v4.11-rc1~116^2~193 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=8a140b45e4ad63377f9a1753a38613252ee6092a;p=karo-tx-linux.git staging: lustre: ldlm: Restore connect flags on failure Restore connect flags on failure of ptlrpc_connect_import() to prevent an LBUG due to flags mismatch. Signed-off-by: Jeremy Filizetti Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7185 Reviewed-on: http://review.whamcloud.com/16950 Reviewed-by: Andreas Dilger Reviewed-by: Sebastien Buisson Reviewed-by: John L. Hammond Signed-off-by: James Simmons Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_lib.c b/drivers/staging/lustre/lustre/ldlm/ldlm_lib.c index 95b8c76f70d0..3663c5cdb051 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_lib.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_lib.c @@ -523,6 +523,8 @@ int client_connect_import(const struct lu_env *env, rc = ptlrpc_connect_import(imp); if (rc != 0) { + if (data && is_mdc) + data->ocd_connect_flags &= ~OBD_CONNECT_MULTIMODRPCS; LASSERT(imp->imp_state == LUSTRE_IMP_DISCON); goto out_ldlm; }