Whamcloud - gitweb
LU-5287 export: hold exp_lock when modify exp_flags
[fs/lustre-release.git] / lustre / mdt / mdt_handler.c
index c1e5ea8..f244e61 100644 (file)
@@ -1195,7 +1195,7 @@ static int mdt_swap_layouts(struct tgt_session_info *tsi)
        info = tsi2mdt_info(tsi);
 
        if (info->mti_dlm_req != NULL)
-               ldlm_request_cancel(req, info->mti_dlm_req, 0);
+               ldlm_request_cancel(req, info->mti_dlm_req, 0, LATF_SKIP);
 
        if (req_capsule_get_size(info->mti_pill, &RMF_CAPA1, RCL_CLIENT))
                mdt_set_capainfo(info, 0, &info->mti_body->mbo_fid1,
@@ -5046,7 +5046,9 @@ static int mdt_obd_connect(const struct lu_env *env,
                         mdt_export_stats_init(obd, lexp, localdata);
 
                /* For phase I, sync for cross-ref operation. */
+               spin_lock(&lexp->exp_lock);
                lexp->exp_keep_sync = 1;
+               spin_unlock(&lexp->exp_lock);
         }
 
         if (rc != 0) {