Whamcloud - gitweb
LU-887 mgc: prevent client IR with old server
[fs/lustre-release.git] / lustre / mgc / mgc_request.c
index a628354..49262b4 100644 (file)
@@ -1905,8 +1905,15 @@ static int mgc_process_config(struct obd_device *obd, obd_count len, void *buf)
                 cld->cld_cfg.cfg_flags |= CFG_F_COMPAT146;
 
                 rc = mgc_process_log(obd, cld);
-                if (rc == 0 && cld->cld_recover) {
-                        rc = mgc_process_log(obd, cld->cld_recover);
+                if (rc == 0 && cld->cld_recover != NULL) {
+                        if (OCD_HAS_FLAG(&obd->u.cli.cl_import->
+                                         imp_connect_data, IMP_RECOV)) {
+                                rc = mgc_process_log(obd, cld->cld_recover);
+                        } else {
+                                struct config_llog_data *cir = cld->cld_recover;
+                                cld->cld_recover = NULL;
+                                config_log_put(cir);
+                        }
                         if (rc)
                                 CERROR("Cannot process recover llog %d\n", rc);
                 }