Lines Matching refs:locked
650 unsigned long locked; in do_mlock() local
664 locked = len >> PAGE_SHIFT; in do_mlock()
669 locked += current->mm->locked_vm; in do_mlock()
670 if ((locked > lock_limit) && (!capable(CAP_IPC_LOCK))) { in do_mlock()
677 locked -= count_mm_mlocked_page_nr(current->mm, in do_mlock()
682 if ((locked <= lock_limit) || capable(CAP_IPC_LOCK)) in do_mlock()
824 unsigned long lock_limit, locked; in user_shm_lock() local
828 locked = (size + PAGE_SIZE - 1) >> PAGE_SHIFT; in user_shm_lock()
834 memlock = inc_rlimit_ucounts(ucounts, UCOUNT_RLIMIT_MEMLOCK, locked); in user_shm_lock()
837 dec_rlimit_ucounts(ucounts, UCOUNT_RLIMIT_MEMLOCK, locked); in user_shm_lock()
841 dec_rlimit_ucounts(ucounts, UCOUNT_RLIMIT_MEMLOCK, locked); in user_shm_lock()