LDLM lock can guarantee LOD object directory striping is safe to
access, but lod_striping_free_nolock() should clear .do_index_ops,
otherwise upon some failure the directory striping is freed, while a
subsequent dt_try_as_dir() skips striping initialization, and call
.do_index_ops directly, which will cause crash.
Signed-off-by: Lai Siyao <lai.siyao@whamcloud.com>
Change-Id: Ib94a4ef2f8bf5f0d34521abff77d8be46ecbf428
Reviewed-on: https://review.whamcloud.com/47256
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Hongchao Zhang <hongchao@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lo->ldo_dir_stripes_allocated = 0;
lo->ldo_dir_stripe_loaded = 0;
lo->ldo_dir_stripe_count = 0;
+ lo->ldo_obj.do_index_ops = NULL;
} else if (lo->ldo_comp_entries != NULL) {
for (i = 0; i < lo->ldo_comp_cnt; i++) {
/* free lod_layout_component::llc_stripe array */