When lum is realloc(), the comp_v1 needs to be updated, otherwise
it could point to the old invalid memory area.
Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Change-Id: I4493e5f13bce22dae07200bada14ba2349635890
Reviewed-on: https://review.whamcloud.com/26858
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
goto error;
} else {
lum = blob;
+ comp_v1 = (struct lov_comp_md_v1 *)lum;
blob = (struct lov_user_md *)((char *)lum + lum_size);
lum_size += blob_size;
}
lmm_objects[i].l_ost_idx =
comp->llc_objects[i].l_ost_idx;
- if (comp_v1 != NULL) {
+ if (layout->llot_is_composite) {
ent = &comp_v1->lcm_entries[ent_idx];
ent->lcme_id = comp->llc_id;
ent->lcme_flags = comp->llc_flags;