X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Fosp%2Fosp_object.c;h=7cb1d9a5c393324485dd8e0d8cd35e870ab1abc2;hb=aa368474cb4de18361e875ff503a98ba479bc3c6;hp=2426be1f1191c21c2c3409d3f6eb344aa2b3d912;hpb=4d5bc3e5e74c3c2fc01cf51570ed8cee3521fd72;p=fs%2Flustre-release.git diff --git a/lustre/osp/osp_object.c b/lustre/osp/osp_object.c index 2426be1..7cb1d9a 100644 --- a/lustre/osp/osp_object.c +++ b/lustre/osp/osp_object.c @@ -370,16 +370,13 @@ static int osp_object_init(const struct lu_env *env, struct lu_object *o, po->opo_obj.do_ops = &osp_md_obj_ops; o->lo_header->loh_attr |= LOHA_REMOTE; po->opo_obj.do_lock_ops = &osp_md_lock_ops; - /* Do not need get attr for new object */ - if (!(conf != NULL && (conf->loc_flags & LOC_F_NEW) != 0)) { - rc = po->opo_obj.do_ops->do_attr_get(env, lu2dt_obj(o), - la, NULL); - if (rc == 0) - o->lo_header->loh_attr |= - LOHA_EXISTS | (la->la_mode & S_IFMT); - if (rc == -ENOENT) - rc = 0; - } + rc = po->opo_obj.do_ops->do_attr_get(env, lu2dt_obj(o), + la, NULL); + if (rc == 0) + o->lo_header->loh_attr |= + LOHA_EXISTS | (la->la_mode & S_IFMT); + if (rc == -ENOENT) + rc = 0; } RETURN(rc); }