From 84e925a5611028f49c8ad07996352c2f062f598e Mon Sep 17 00:00:00 2001 From: Yoshifumi Uemura Date: Wed, 12 Nov 2014 16:02:04 +0900 Subject: [PATCH] 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 --- lustre/mdc/mdc_lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 1.8.3.1