X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Fofd%2Fofd_objects.c;h=19b790be487a5fecd4637a2c08196851997bb5f4;hb=665ad328b368f1cbd8646690999b609d7b0feaf9;hp=c78633347f80ac4de117f128e1e3aafa9225f47c;hpb=227ed3d87354cc1122343ef4f4e931960d1fe276;p=fs%2Flustre-release.git diff --git a/lustre/ofd/ofd_objects.c b/lustre/ofd/ofd_objects.c index c786333..19b790b 100644 --- a/lustre/ofd/ofd_objects.c +++ b/lustre/ofd/ofd_objects.c @@ -616,12 +616,12 @@ int ofd_object_punch(const struct lu_env *env, struct ofd_object *fo, /* we support truncate, not punch yet */ LASSERT(end == OBD_OBJECT_EOF); + ofd_write_lock(env, fo); fmd = ofd_fmd_get(info->fti_exp, &fo->ofo_header.loh_fid); if (fmd && fmd->fmd_mactime_xid < info->fti_xid) fmd->fmd_mactime_xid = info->fti_xid; ofd_fmd_put(info->fti_exp, fmd); - ofd_write_lock(env, fo); if (!ofd_object_exists(fo)) GOTO(unlock, rc = -ENOENT);