From: Alex Zhuravlev Date: Wed, 12 Dec 2012 18:26:19 +0000 (+0400) Subject: LU-2485 lod: initialize v3 to actual buf X-Git-Tag: 2.3.58~8 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=b321ec24b8ddfb6857dd214eaf7f34cb39eedcba;p=fs%2Flustre-release.git LU-2485 lod: initialize v3 to actual buf and do not pass v3=NULL to lustre_swab_lov_user_md_v3() Signed-off-by: Alex Zhuravlev Change-Id: I7ad7898a736833ac86e0188248c2222a7652f41a Reviewed-on: http://review.whamcloud.com/4814 Reviewed-by: Andreas Dilger Tested-by: Hudson Reviewed-by: Mike Pershin Tested-by: Maloo --- diff --git a/lustre/lod/lod_qos.c b/lustre/lod/lod_qos.c index e59b904..187f85c 100644 --- a/lustre/lod/lod_qos.c +++ b/lustre/lod/lod_qos.c @@ -1262,10 +1262,12 @@ static int lod_qos_parse_config(const struct lu_env *env, v1 = buf->lb_buf; magic = v1->lmm_magic; - if (magic == __swab32(LOV_USER_MAGIC_V1)) + if (magic == __swab32(LOV_USER_MAGIC_V1)) { lustre_swab_lov_user_md_v1(v1); - else if (magic == __swab32(LOV_USER_MAGIC_V3)) + } else if (magic == __swab32(LOV_USER_MAGIC_V3)) { + v3 = buf->lb_buf; lustre_swab_lov_user_md_v3(v3); + } if (unlikely(magic != LOV_MAGIC_V1 && magic != LOV_MAGIC_V3)) { /* try to use as fully defined striping */