remote object can disappear while we're getting an ldlm lock for
it. we can't check object's attributes before we're sure it does
exist. so check object's locality first.
Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: I86ad0f3e7c38b0dce51a9fd836ba2293b210fe4f
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52716
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Mikhail Pershin <mpershin@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
ldlm_set_ast_sent(lock);
}
- if (S_ISREG(lu_object_attr(&child->mot_obj)) &&
- !mdt_object_remote(child) && child != parent) {
+ /*
+ * check whether the object is remote as we can't
+ * really check attributes w/o explicit check for
+ * object's existence first.
+ */
+ if (!mdt_object_remote(child) && child != parent &&
+ S_ISREG(lu_object_attr(&child->mot_obj))) {
mdt_object_put(info->mti_env, child);
rc = mdt_pack_size2body(info, child_fid,
&lhc->mlh_reg_lh);