Whamcloud - gitweb
LU-5287 export: hold exp_lock when modify exp_flags
[fs/lustre-release.git] / lustre / mdt / mdt_handler.c
index 569ecf6..f244e61 100644 (file)
@@ -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. */
                         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;
                lexp->exp_keep_sync = 1;
+               spin_unlock(&lexp->exp_lock);
         }
 
         if (rc != 0) {
         }
 
         if (rc != 0) {