We should not check for object existence in
ofd_version_get_check() when we haven't got the lock yet.
ofd_attr_set() will check it later.
In ofd_destroy(), we should unlock if the object
does not exist, otherwise oti_w_locks assertion will fail.
Change-Id: I00f67d15c3268bcf55aafa88c088f2dbf55a470c
Signed-off-by: Andrew Perepechko <andrew.perepechko@hpe.com>
HPE-bug-id: LUS-9063,LUS-9282
Reviewed-on: https://review.whamcloud.com/39765
Reviewed-by: Alexander Zarochentsev <alexander.zarochentsev@hpe.com>
Reviewed-by: Alexander Boyko <alexander.boyko@hpe.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
{
dt_obj_version_t curr_version;
{
dt_obj_version_t curr_version;
- LASSERT(ofd_object_exists(fo));
-
if (info->fti_exp == NULL)
RETURN(0);
if (info->fti_exp == NULL)
RETURN(0);
ofd_write_lock(env, fo);
if (!ofd_object_exists(fo))
ofd_write_lock(env, fo);
if (!ofd_object_exists(fo))
- GOTO(stop, rc = -ENOENT);
+ GOTO(unlock, rc = -ENOENT);
tgt_fmd_drop(ofd_info(env)->fti_exp, &fo->ofo_header.loh_fid);
dt_ref_del(env, ofd_object_child(fo), th);
dt_destroy(env, ofd_object_child(fo), th);
tgt_fmd_drop(ofd_info(env)->fti_exp, &fo->ofo_header.loh_fid);
dt_ref_del(env, ofd_object_child(fo), th);
dt_destroy(env, ofd_object_child(fo), th);
ofd_write_unlock(env, fo);
ofd_write_unlock(env, fo);
stop:
rc2 = ofd_trans_stop(env, ofd, th, rc);
if (rc2)
stop:
rc2 = ofd_trans_stop(env, ofd, th, rc);
if (rc2)