The variable hsmsize was uninitialized in some
situations. By moving the initialization earlier,
we can avoid this.
Fixes:
aebb405e32e ("LU-10499 pcc: use foreign layout for PCCRO")
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: I3385e3349ad00d037b8b94337cb3352623d0a40a
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52566
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Qian Yingjin <qian@ddn.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
}
lhm = (struct lov_hsm_md *)lfm;
+ hsmsize = lov_foreign_size_le(lhm);
+
if (le32_to_cpu(lhm->lhm_length) !=
sizeof(struct lov_hsm_base)) {
CDEBUG(D_LAYOUT,
RETURN(-EINVAL);
}
- hsmsize = lov_foreign_size_le(lhm);
if (le32_to_cpu(ent->lcme_size) < hsmsize) {
CDEBUG(D_LAYOUT,
"Invalid HSM component size %u != %u\n",