Lines Matching refs:un
653 struct sem_undo *un; in perform_atomic_semop_slow() local
657 un = q->undo; in perform_atomic_semop_slow()
675 int undo = un->semadj[sop->sem_num] - sem_op; in perform_atomic_semop_slow()
679 un->semadj[sop->sem_num] = undo; in perform_atomic_semop_slow()
712 un->semadj[sop->sem_num] += sem_op; in perform_atomic_semop_slow()
725 struct sem_undo *un; in perform_atomic_semop() local
729 un = q->undo; in perform_atomic_semop()
758 int undo = un->semadj[sop->sem_num] - sem_op; in perform_atomic_semop()
771 int undo = un->semadj[sop->sem_num] - sem_op; in perform_atomic_semop()
773 un->semadj[sop->sem_num] = undo; in perform_atomic_semop()
1145 struct sem_undo *un, *tu; in freeary() local
1153 list_for_each_entry_safe(un, tu, &sma->list_id, list_id) { in freeary()
1154 list_del(&un->list_id); in freeary()
1155 spin_lock(&un->ulp->lock); in freeary()
1156 un->semid = -1; in freeary()
1157 list_del_rcu(&un->list_proc); in freeary()
1158 spin_unlock(&un->ulp->lock); in freeary()
1159 kvfree_rcu(un, rcu); in freeary()
1346 struct sem_undo *un; in semctl_setval() local
1391 list_for_each_entry(un, &sma->list_id, list_id) in semctl_setval()
1392 un->semadj[semnum] = 0; in semctl_setval()
1476 struct sem_undo *un; in semctl_main() local
1519 list_for_each_entry(un, &sma->list_id, list_id) { in semctl_main()
1521 un->semadj[i] = 0; in semctl_main()
1871 struct sem_undo *un; in __lookup_undo() local
1873 list_for_each_entry_rcu(un, &ulp->list_proc, list_proc, in __lookup_undo()
1875 if (un->semid == semid) in __lookup_undo()
1876 return un; in __lookup_undo()
1883 struct sem_undo *un; in lookup_undo() local
1887 un = __lookup_undo(ulp, semid); in lookup_undo()
1888 if (un) { in lookup_undo()
1889 list_del_rcu(&un->list_proc); in lookup_undo()
1890 list_add_rcu(&un->list_proc, &ulp->list_proc); in lookup_undo()
1892 return un; in lookup_undo()
1910 struct sem_undo *un, *new; in find_alloc_undo() local
1919 un = lookup_undo(ulp, semid); in find_alloc_undo()
1921 if (likely(un != NULL)) in find_alloc_undo()
1935 un = ERR_PTR(-EIDRM); in find_alloc_undo()
1954 un = ERR_PTR(-EIDRM); in find_alloc_undo()
1962 un = lookup_undo(ulp, semid); in find_alloc_undo()
1963 if (un) { in find_alloc_undo()
1975 un = new; in find_alloc_undo()
1980 return un; in find_alloc_undo()
1990 struct sem_undo *un; in __do_semtimedop() local
2037 un = find_alloc_undo(ns, semid); in __do_semtimedop()
2038 if (IS_ERR(un)) { in __do_semtimedop()
2039 error = PTR_ERR(un); in __do_semtimedop()
2043 un = NULL; in __do_semtimedop()
2091 if (un && un->semid == -1) in __do_semtimedop()
2096 queue.undo = un; in __do_semtimedop()
2349 struct sem_undo *un; in exit_sem() local
2356 un = list_entry_rcu(ulp->list_proc.next, in exit_sem()
2358 if (&un->list_proc == &ulp->list_proc) { in exit_sem()
2371 semid = un->semid; in exit_sem()
2394 un = __lookup_undo(ulp, semid); in exit_sem()
2395 if (un == NULL) { in exit_sem()
2406 list_del(&un->list_id); in exit_sem()
2409 list_del_rcu(&un->list_proc); in exit_sem()
2415 if (un->semadj[i]) { in exit_sem()
2416 semaphore->semval += un->semadj[i]; in exit_sem()
2443 kvfree_rcu(un, rcu); in exit_sem()