Lines Matching refs:target
280 struct dlm_lock *lock, *target; in dlm_shuffle_lists() local
305 target = list_entry(res->converting.next, struct dlm_lock, list); in dlm_shuffle_lists()
306 if (target->ml.convert_type == LKM_IVMODE) { in dlm_shuffle_lists()
314 if (lock==target) in dlm_shuffle_lists()
317 target->ml.convert_type)) { in dlm_shuffle_lists()
325 if (lock->ml.highest_blocked < target->ml.convert_type) in dlm_shuffle_lists()
327 target->ml.convert_type; in dlm_shuffle_lists()
333 if (lock==target) in dlm_shuffle_lists()
336 target->ml.convert_type)) { in dlm_shuffle_lists()
342 if (lock->ml.highest_blocked < target->ml.convert_type) in dlm_shuffle_lists()
344 target->ml.convert_type; in dlm_shuffle_lists()
350 spin_lock(&target->spinlock); in dlm_shuffle_lists()
351 BUG_ON(target->ml.highest_blocked != LKM_IVMODE); in dlm_shuffle_lists()
355 res->lockname.name, target->ml.type, in dlm_shuffle_lists()
356 target->ml.convert_type, target->ml.node); in dlm_shuffle_lists()
358 target->ml.type = target->ml.convert_type; in dlm_shuffle_lists()
359 target->ml.convert_type = LKM_IVMODE; in dlm_shuffle_lists()
360 list_move_tail(&target->list, &res->granted); in dlm_shuffle_lists()
362 BUG_ON(!target->lksb); in dlm_shuffle_lists()
363 target->lksb->status = DLM_NORMAL; in dlm_shuffle_lists()
365 spin_unlock(&target->spinlock); in dlm_shuffle_lists()
368 dlm_queue_ast(dlm, target); in dlm_shuffle_lists()
376 target = list_entry(res->blocked.next, struct dlm_lock, list); in dlm_shuffle_lists()
381 if (lock==target) in dlm_shuffle_lists()
383 if (!dlm_lock_compatible(lock->ml.type, target->ml.type)) { in dlm_shuffle_lists()
389 if (lock->ml.highest_blocked < target->ml.type) in dlm_shuffle_lists()
390 lock->ml.highest_blocked = target->ml.type; in dlm_shuffle_lists()
397 if (lock==target) in dlm_shuffle_lists()
399 if (!dlm_lock_compatible(lock->ml.type, target->ml.type)) { in dlm_shuffle_lists()
405 if (lock->ml.highest_blocked < target->ml.type) in dlm_shuffle_lists()
406 lock->ml.highest_blocked = target->ml.type; in dlm_shuffle_lists()
413 spin_lock(&target->spinlock); in dlm_shuffle_lists()
414 BUG_ON(target->ml.highest_blocked != LKM_IVMODE); in dlm_shuffle_lists()
418 target->ml.type, target->ml.node); in dlm_shuffle_lists()
421 list_move_tail(&target->list, &res->granted); in dlm_shuffle_lists()
423 BUG_ON(!target->lksb); in dlm_shuffle_lists()
424 target->lksb->status = DLM_NORMAL; in dlm_shuffle_lists()
426 spin_unlock(&target->spinlock); in dlm_shuffle_lists()
429 dlm_queue_ast(dlm, target); in dlm_shuffle_lists()