From: Yoshifumi Uemura Date: Wed, 12 Nov 2014 07:02:04 +0000 (+0900) Subject: LU-5889 mdc: Proper accessing struct lov_user_md X-Git-Tag: 2.6.91~11 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=84e925a5611028f49c8ad07996352c2f062f598e LU-5889 mdc: Proper accessing struct lov_user_md In mdc_setattr_pack() access the members of struct lov_user_md by little endian byte order. Signed-off-by: Yoshifumi Uemura Change-Id: I201f00f527242faa6e1a199d3e792e5cdfa48006 Reviewed-on: http://review.whamcloud.com/12683 Tested-by: Jenkins Reviewed-by: Dmitry Eremin Reviewed-by: James Simmons Tested-by: Maloo Reviewed-by: Yang Sheng Reviewed-by: Oleg Drokin --- diff --git a/lustre/mdc/mdc_lib.c b/lustre/mdc/mdc_lib.c index d07c555..6219cd9 100644 --- a/lustre/mdc/mdc_lib.c +++ b/lustre/mdc/mdc_lib.c @@ -375,7 +375,7 @@ void mdc_setattr_pack(struct ptlrpc_request *req, struct md_op_data *op_data, lum = req_capsule_client_get(&req->rq_pill, &RMF_EADATA); if (ea == NULL) { /* Remove LOV EA */ - lum->lmm_magic = LOV_USER_MAGIC_V1; + lum->lmm_magic = cpu_to_le32(LOV_USER_MAGIC_V1); lum->lmm_stripe_size = 0; lum->lmm_stripe_count = 0; lum->lmm_stripe_offset = (typeof(lum->lmm_stripe_offset))(-1);