/* Sets the owner of the lockres, associated to the mle, to UNKNOWN  */
static struct dlm_lock_resource* dlm_reset_mleres_owner(struct dlm_ctxt *dlm, struct dlm_master_list_entry *mle)
/* Sets the owner of the lockres, associated to the mle, to UNKNOWN  */
static struct dlm_lock_resource* dlm_reset_mleres_owner(struct dlm_ctxt *dlm, struct dlm_master_list_entry *mle)
{
	struct dlm_lock_resource *res;
	res = __dlm_lookup_lockres(dlm, mle->mname, mle->mnamelen,
				   mle->mnamehash);
	if (res) {
		spin_unlock(&dlm->master_lock);
		spin_lock(&res->spinlock);
		dlm_set_lockres_owner(dlm, res, DLM_LOCK_RES_OWNER_UNKNOWN);
		dlm_move_lockres_to_recovery_list(dlm, res);
		spin_unlock(&res->spinlock);
		dlm_lockres_put(res);
		__dlm_mle_detach_hb_events(dlm, mle);
		spin_lock(&dlm->master_lock);
		__dlm_put_mle(mle);
		spin_unlock(&dlm->master_lock);
	}
	return res;
}