if (first >= count)
RETURN(0);
+ if (count == 1 && dlm_req->lock_handle[0].cookie == 0)
+ RETURN(0);
+
/* There is no lock on the server at the replay time,
* skip lock cancelling to make replay tests to pass. */
if (lustre_msg_get_flags(req->rq_reqmsg) & MSG_REPLAY)
ENTRY;
+ fo = ofd_object_find(env, ofd, fid);
+ if (IS_ERR(fo))
+ RETURN(PTR_ERR(fo));
+
/* Tell the clients that the object is gone now and that they should
* throw away any cached pages. */
ofd_build_resid(fid, &info->fti_resid);
if (rc == ELDLM_OK)
ldlm_lock_decref(&lockh, LCK_PW);
- fo = ofd_object_find(env, ofd, fid);
- if (IS_ERR(fo))
- RETURN(PTR_ERR(fo));
LASSERT(fo != NULL);
rc = ofd_object_destroy(env, fo, orphan);
lrc = ofd_destroy_by_fid(env, ofd, &info->fti_fid, 0);
if (lrc == -ENOENT) {
CDEBUG(D_INODE,
- "destroying non-existent object "LPU64"\n",
- oa->o_id);
+ "%s: destroying non-existent object "DFID"\n",
+ ofd_obd(ofd)->obd_name, PFID(&info->fti_fid));
/* rewrite rc with -ENOENT only if it is 0 */
if (rc == 0)
rc = lrc;
} else if (lrc != 0) {
- CEMERG("error destroying object "LPU64": %d\n",
- oa->o_id, rc);
+ CERROR("%s: error destroying object "DFID": %d\n",
+ ofd_obd(ofd)->obd_name, PFID(&info->fti_fid),
+ rc);
rc = lrc;
}
count--;