Lines Matching refs:target

343 	struct dlm_lock *lock, *target;
364 target = list_entry(res->converting.next, struct dlm_lock, list);
365 if (target->ml.convert_type == LKM_IVMODE) {
371 if (lock==target)
374 target->ml.convert_type)) {
382 if (lock->ml.highest_blocked < target->ml.convert_type)
384 target->ml.convert_type;
389 if (lock==target)
392 target->ml.convert_type)) {
398 if (lock->ml.highest_blocked < target->ml.convert_type)
400 target->ml.convert_type;
406 spin_lock(&target->spinlock);
407 BUG_ON(target->ml.highest_blocked != LKM_IVMODE);
412 dlm_get_lock_cookie_node(be64_to_cpu(target->ml.cookie)),
413 dlm_get_lock_cookie_seq(be64_to_cpu(target->ml.cookie)),
414 target->ml.type,
415 target->ml.convert_type, target->ml.node);
417 target->ml.type = target->ml.convert_type;
418 target->ml.convert_type = LKM_IVMODE;
419 list_move_tail(&target->list, &res->granted);
421 BUG_ON(!target->lksb);
422 target->lksb->status = DLM_NORMAL;
424 spin_unlock(&target->spinlock);
427 __dlm_queue_ast(dlm, target);
435 target = list_entry(res->blocked.next, struct dlm_lock, list);
438 if (lock==target)
440 if (!dlm_lock_compatible(lock->ml.type, target->ml.type)) {
446 if (lock->ml.highest_blocked < target->ml.type)
447 lock->ml.highest_blocked = target->ml.type;
452 if (lock==target)
454 if (!dlm_lock_compatible(lock->ml.type, target->ml.type)) {
460 if (lock->ml.highest_blocked < target->ml.type)
461 lock->ml.highest_blocked = target->ml.type;
468 spin_lock(&target->spinlock);
469 BUG_ON(target->ml.highest_blocked != LKM_IVMODE);
474 dlm_get_lock_cookie_node(be64_to_cpu(target->ml.cookie)),
475 dlm_get_lock_cookie_seq(be64_to_cpu(target->ml.cookie)),
476 target->ml.type, target->ml.node);
478 /* target->ml.type is already correct */
479 list_move_tail(&target->list, &res->granted);
481 BUG_ON(!target->lksb);
482 target->lksb->status = DLM_NORMAL;
484 spin_unlock(&target->spinlock);
487 __dlm_queue_ast(dlm, target);