There are few places that changing the exp_flags without holding
exp_lock, that could overwrite other concurrent exp_flags updating.
Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: I9c0421ffeacd6bf6feaa31dca9f9fc0e7963bc8b
* OBD_CONNECT_MNE_SWAB flag around forever, just so long as we need
* interop with unpatched 2.2 clients. For newer clients, servers
* will never do MNE swabbing, let the client handle that. LU-1644 */
+ spin_lock(&export->exp_lock);
export->exp_need_mne_swab = !ptlrpc_req_need_swab(req) &&
!(data->ocd_connect_flags & OBD_CONNECT_MNE_SWAB);
+ spin_unlock(&export->exp_lock);
#else
#warning "LU-1644: Remove old OBD_CONNECT_MNE_SWAB fixup and exp_need_mne_swab"
#endif
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) {