aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/lustre/lustre/mdc/mdc_lib.c
diff options
context:
space:
mode:
authorYoshifumi Uemura <kogexe@gmail.com>2016-09-18 16:38:21 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-09-19 09:53:45 +0200
commit8971ee5bc1ab24eb63ac379b7bd7e16619862834 (patch)
treeb5dfa61bf6ec11e30f8e62e3bf158a87240c7970 /drivers/staging/lustre/lustre/mdc/mdc_lib.c
parentstaging: lustre: obdclass: lu_htable_order() return type to long (diff)
downloadlinux-dev-8971ee5bc1ab24eb63ac379b7bd7e16619862834.tar.xz
linux-dev-8971ee5bc1ab24eb63ac379b7bd7e16619862834.zip
staging: lustre: 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 <kogexe@gmail.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5889 Reviewed-on: http://review.whamcloud.com/12683 Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com> Reviewed-by: James Simmons <uja.ornl@gmail.com> Reviewed-by: Yang Sheng <yang.sheng@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre/lustre/mdc/mdc_lib.c')
-rw-r--r--drivers/staging/lustre/lustre/mdc/mdc_lib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/lustre/lustre/mdc/mdc_lib.c b/drivers/staging/lustre/lustre/mdc/mdc_lib.c
index 82d1c4d9789b..aac7e04873e2 100644
--- a/drivers/staging/lustre/lustre/mdc/mdc_lib.c
+++ b/drivers/staging/lustre/lustre/mdc/mdc_lib.c
@@ -328,7 +328,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) { /* 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);