X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fobdclass%2Fmd_attrs.c;h=190524a6f8d0eed0555b3703398fc25a61799dfa;hp=d83b5bbe3013485584da7d73b07dd620fe6a3cba;hb=82fcdd9b16aad0b1cd840383c6f3b18c40be00bd;hpb=2b5ed7c24b3d91bcd704281dc563e71e4689990c diff --git a/lustre/obdclass/md_attrs.c b/lustre/obdclass/md_attrs.c index d83b5bb..190524a 100644 --- a/lustre/obdclass/md_attrs.c +++ b/lustre/obdclass/md_attrs.c @@ -63,12 +63,11 @@ EXPORT_SYMBOL(lustre_lma_init); */ void lustre_lma_swab(struct lustre_mdt_attrs *lma) { - /* Use LUSTRE_MSG_MAGIC to detect local endianess. */ - if (LUSTRE_MSG_MAGIC != cpu_to_le32(LUSTRE_MSG_MAGIC)) { - __swab32s(&lma->lma_compat); - __swab32s(&lma->lma_incompat); - lustre_swab_lu_fid(&lma->lma_self_fid); - } +#ifdef __BIG_ENDIAN + __swab32s(&lma->lma_compat); + __swab32s(&lma->lma_incompat); + lustre_swab_lu_fid(&lma->lma_self_fid); +#endif }; EXPORT_SYMBOL(lustre_lma_swab); @@ -80,13 +79,12 @@ EXPORT_SYMBOL(lustre_lma_swab); */ void lustre_hsm_swab(struct hsm_attrs *attrs) { - /* Use LUSTRE_MSG_MAGIC to detect local endianess. */ - if (LUSTRE_MSG_MAGIC != cpu_to_le32(LUSTRE_MSG_MAGIC)) { - __swab32s(&attrs->hsm_compat); - __swab32s(&attrs->hsm_flags); - __swab64s(&attrs->hsm_arch_id); - __swab64s(&attrs->hsm_arch_ver); - } +#ifdef __BIG_ENDIAN + __swab32s(&attrs->hsm_compat); + __swab32s(&attrs->hsm_flags); + __swab64s(&attrs->hsm_arch_id); + __swab64s(&attrs->hsm_arch_ver); +#endif }; /*