Lines Matching refs:target
345 struct dlm_lock *lock, *target;
366 target = list_entry(res->converting.next, struct dlm_lock, list);
367 if (target->ml.convert_type == LKM_IVMODE) {
373 if (lock==target)
376 target->ml.convert_type)) {
384 if (lock->ml.highest_blocked < target->ml.convert_type)
386 target->ml.convert_type;
391 if (lock==target)
394 target->ml.convert_type)) {
400 if (lock->ml.highest_blocked < target->ml.convert_type)
402 target->ml.convert_type;
408 spin_lock(&target->spinlock);
409 BUG_ON(target->ml.highest_blocked != LKM_IVMODE);
414 dlm_get_lock_cookie_node(be64_to_cpu(target->ml.cookie)),
415 dlm_get_lock_cookie_seq(be64_to_cpu(target->ml.cookie)),
416 target->ml.type,
417 target->ml.convert_type, target->ml.node);
419 target->ml.type = target->ml.convert_type;
420 target->ml.convert_type = LKM_IVMODE;
421 list_move_tail(&target->list, &res->granted);
423 BUG_ON(!target->lksb);
424 target->lksb->status = DLM_NORMAL;
426 spin_unlock(&target->spinlock);
429 __dlm_queue_ast(dlm, target);
437 target = list_entry(res->blocked.next, struct dlm_lock, list);
440 if (lock==target)
442 if (!dlm_lock_compatible(lock->ml.type, target->ml.type)) {
448 if (lock->ml.highest_blocked < target->ml.type)
449 lock->ml.highest_blocked = target->ml.type;
454 if (lock==target)
456 if (!dlm_lock_compatible(lock->ml.type, target->ml.type)) {
462 if (lock->ml.highest_blocked < target->ml.type)
463 lock->ml.highest_blocked = target->ml.type;
470 spin_lock(&target->spinlock);
471 BUG_ON(target->ml.highest_blocked != LKM_IVMODE);
476 dlm_get_lock_cookie_node(be64_to_cpu(target->ml.cookie)),
477 dlm_get_lock_cookie_seq(be64_to_cpu(target->ml.cookie)),
478 target->ml.type, target->ml.node);
480 /* target->ml.type is already correct */
481 list_move_tail(&target->list, &res->granted);
483 BUG_ON(!target->lksb);
484 target->lksb->status = DLM_NORMAL;
486 spin_unlock(&target->spinlock);
489 __dlm_queue_ast(dlm, target);