/* Four stage 3 varieties: _request_lock(), _convert_lock(), _unlock_lock(), _cancel_lock()  */
static int _request_lock(struct dlm_rsb *r, struct dlm_lkb *lkb)
/* Four stage 3 varieties: _request_lock(), _convert_lock(), _unlock_lock(), _cancel_lock()  */
static int _request_lock(struct dlm_rsb *r, struct dlm_lkb *lkb)
{
	int error;
	error = set_master(r, lkb);
	if (error < 0)
		goto out;
	if (error) {
		error = 0;
		goto out;
	}
	if (is_remote(r))
		error = send_request(r, lkb);
	else
		error = do_request(r, lkb);
 out:
	return error;
}