/mm/ |
D | maccess.c | 107 long ret; in copy_from_kernel_nofault() local 115 ret = __copy_from_user_inatomic(dst, (__force const void __user *)src, in copy_from_kernel_nofault() 120 if (ret) in copy_from_kernel_nofault() 137 long ret; in copy_to_kernel_nofault() local 142 ret = __copy_to_user_inatomic((__force void __user *)dst, src, size); in copy_to_kernel_nofault() 146 if (ret) in copy_to_kernel_nofault() 174 long ret; in strncpy_from_kernel_nofault() local 185 ret = __get_user(*dst++, (const char __user __force *)src++); in strncpy_from_kernel_nofault() 186 } while (dst[-1] && ret == 0 && src - unsafe_addr < count); in strncpy_from_kernel_nofault() 192 return ret ? -EFAULT : src - unsafe_addr; in strncpy_from_kernel_nofault() [all …]
|
D | page_io.c | 112 int ret; in generic_swapfile_activate() local 132 ret = bmap(inode, &first_block); in generic_swapfile_activate() 133 if (ret || !first_block) in generic_swapfile_activate() 149 ret = bmap(inode, &block); in generic_swapfile_activate() 150 if (ret || !block) in generic_swapfile_activate() 171 ret = add_swap_extent(sis, page_no, 1, first_block); in generic_swapfile_activate() 172 if (ret < 0) in generic_swapfile_activate() 174 nr_extents += ret; in generic_swapfile_activate() 180 ret = nr_extents; in generic_swapfile_activate() 188 return ret; in generic_swapfile_activate() [all …]
|
D | backing-dev.c | 138 ssize_t ret; in read_ahead_kb_store() local 140 ret = kstrtoul(buf, 10, &read_ahead_kb); in read_ahead_kb_store() 141 if (ret < 0) in read_ahead_kb_store() 142 return ret; in read_ahead_kb_store() 168 ssize_t ret; in min_ratio_store() local 170 ret = kstrtouint(buf, 10, &ratio); in min_ratio_store() 171 if (ret < 0) in min_ratio_store() 172 return ret; in min_ratio_store() 174 ret = bdi_set_min_ratio(bdi, ratio); in min_ratio_store() 175 if (!ret) in min_ratio_store() [all …]
|
D | gup.c | 209 bool ret = try_get_page(page); in try_grab_page() local 211 if (ret) { in try_grab_page() 215 return ret; in try_grab_page() 433 int ret; in follow_page_pte() local 504 ret = follow_pfn_pte(vma, address, ptep, flags); in follow_page_pte() 505 page = ERR_PTR(ret); in follow_page_pte() 514 ret = split_huge_page(page); in follow_page_pte() 517 if (ret) in follow_page_pte() 518 return ERR_PTR(ret); in follow_page_pte() 533 ret = arch_make_page_accessible(page); in follow_page_pte() [all …]
|
D | util.c | 476 int ret = 0; in __account_locked_vm() local 485 ret = -ENOMEM; in __account_locked_vm() 487 if (!ret) in __account_locked_vm() 497 ret ? " - exceeded" : ""); in __account_locked_vm() 499 return ret; in __account_locked_vm() 517 int ret; in account_locked_vm() local 523 ret = __account_locked_vm(mm, pages, inc, current, in account_locked_vm() 527 return ret; in account_locked_vm() 535 unsigned long ret; in vm_mmap_pgoff() local 540 ret = security_mmap_file(file, prot, flag); in vm_mmap_pgoff() [all …]
|
D | memory.c | 992 int progress, ret = 0; in copy_pte_range() local 1003 ret = -ENOMEM; in copy_pte_range() 1039 ret = copy_present_pte(dst_vma, src_vma, dst_pte, src_pte, in copy_pte_range() 1045 if (unlikely(ret == -EAGAIN)) in copy_pte_range() 1069 ret = -ENOMEM; in copy_pte_range() 1073 } else if (ret) { in copy_pte_range() 1074 WARN_ON_ONCE(ret != -EAGAIN); in copy_pte_range() 1079 ret = 0; in copy_pte_range() 1086 return ret; in copy_pte_range() 1198 int ret; in copy_page_range() local [all …]
|
D | memory_hotplug.c | 785 int ret; in online_pages() local 803 ret = memory_notify(MEM_GOING_ONLINE, &arg); in online_pages() 804 ret = notifier_to_errno(ret); in online_pages() 805 if (ret) in online_pages() 867 return ret; in online_pages() 961 int ret = 1; in __try_online_node() local 969 ret = -ENOMEM; in __try_online_node() 975 ret = register_one_node(nid); in __try_online_node() 976 BUG_ON(ret); in __try_online_node() 979 return ret; in __try_online_node() [all …]
|
D | page-writeback.c | 518 int ret; in dirty_background_ratio_handler() local 520 ret = proc_dointvec_minmax(table, write, buffer, lenp, ppos); in dirty_background_ratio_handler() 521 if (ret == 0 && write) in dirty_background_ratio_handler() 523 return ret; in dirty_background_ratio_handler() 529 int ret; in dirty_background_bytes_handler() local 531 ret = proc_doulongvec_minmax(table, write, buffer, lenp, ppos); in dirty_background_bytes_handler() 532 if (ret == 0 && write) in dirty_background_bytes_handler() 534 return ret; in dirty_background_bytes_handler() 541 int ret; in dirty_ratio_handler() local 543 ret = proc_dointvec_minmax(table, write, buffer, lenp, ppos); in dirty_ratio_handler() [all …]
|
D | mmu_notifier.c | 279 bool ret; in mn_itree_release() local 285 ret = interval_sub->ops->invalidate(interval_sub, &range, in mn_itree_release() 287 WARN_ON(!ret); in mn_itree_release() 460 bool ret; in mn_itree_invalidate() local 462 ret = interval_sub->ops->invalidate(interval_sub, range, in mn_itree_invalidate() 464 if (!ret) { in mn_itree_invalidate() 486 int ret = 0; in mn_hlist_invalidate_range_start() local 517 ret = _ret; in mn_hlist_invalidate_range_start() 522 if (ret) { in mn_hlist_invalidate_range_start() 539 return ret; in mn_hlist_invalidate_range_start() [all …]
|
D | userfaultfd.c | 62 int ret; in mfill_atomic_install_pte() local 90 ret = -EFAULT; in mfill_atomic_install_pte() 95 ret = -EEXIST; in mfill_atomic_install_pte() 117 ret = 0; in mfill_atomic_install_pte() 120 return ret; in mfill_atomic_install_pte() 132 int ret; in mcopy_atomic_pte() local 136 ret = -ENOMEM; in mcopy_atomic_pte() 142 ret = copy_from_user(page_kaddr, in mcopy_atomic_pte() 148 if (unlikely(ret)) { in mcopy_atomic_pte() 149 ret = -ENOENT; in mcopy_atomic_pte() [all …]
|
D | frontswap.c | 247 int ret = -1; in __frontswap_store() local 272 ret = ops->store(type, offset, page); in __frontswap_store() 273 if (!ret) /* successful store */ in __frontswap_store() 276 if (ret == 0) { in __frontswap_store() 284 ret = -1; in __frontswap_store() 285 return ret; in __frontswap_store() 296 int ret = -1; in __frontswap_load() local 312 ret = ops->load(type, offset, page); in __frontswap_load() 313 if (!ret) /* successful load */ in __frontswap_load() 316 if (ret == 0) { in __frontswap_load() [all …]
|
D | nommu.c | 169 void *ret; in __vmalloc_user_flags() local 171 ret = __vmalloc(size, flags); in __vmalloc_user_flags() 172 if (ret) { in __vmalloc_user_flags() 176 vma = find_vma(current->mm, (unsigned long)ret); in __vmalloc_user_flags() 182 return ret; in __vmalloc_user_flags() 421 int ret; in mmap_init() local 423 ret = percpu_counter_init(&vm_committed_as, 0, GFP_KERNEL); in mmap_init() 424 VM_BUG_ON(ret); in mmap_init() 764 int ret; in validate_mmap_request() local 903 ret = security_mmap_addr(addr); in validate_mmap_request() [all …]
|
D | zswap.c | 536 int ret; in zswap_pool_create() local 570 ret = cpuhp_state_add_instance(CPUHP_MM_ZSWP_POOL_PREPARE, in zswap_pool_create() 572 if (ret) in zswap_pool_create() 702 int ret; in __zswap_param_set() local 751 ret = param_set_charp(s, kp); in __zswap_param_set() 753 ret = -EINVAL; in __zswap_param_set() 757 if (!ret) { in __zswap_param_set() 780 ret = param_set_charp(s, kp); in __zswap_param_set() 789 return ret; in __zswap_param_set() 882 int ret; in zswap_writeback_entry() local [all …]
|
D | mremap.c | 772 unsigned long ret = -EINVAL; in mremap_to() local 804 ret = do_munmap(mm, new_addr, new_len, uf_unmap_early); in mremap_to() 805 if (ret) in mremap_to() 810 ret = do_munmap(mm, addr+new_len, old_len - new_len, uf_unmap); in mremap_to() 811 if (ret && old_len != new_len) in mremap_to() 818 ret = PTR_ERR(vma); in mremap_to() 825 ret = -ENOMEM; in mremap_to() 835 ret = get_unmapped_area(vma->vm_file, new_addr, new_len, vma->vm_pgoff + in mremap_to() 838 if (IS_ERR_VALUE(ret)) in mremap_to() 843 new_addr = ret; in mremap_to() [all …]
|
D | oom_kill.c | 97 bool ret = false; in oom_cpuset_eligible() local 112 ret = mempolicy_nodemask_intersects(tsk, mask); in oom_cpuset_eligible() 118 ret = cpuset_mems_allowed_intersects(current, tsk); in oom_cpuset_eligible() 120 if (ret) in oom_cpuset_eligible() 125 return ret; in oom_cpuset_eligible() 557 bool ret = true; in __oom_reap_task_mm() local 591 ret = false; in __oom_reap_task_mm() 600 return ret; in __oom_reap_task_mm() 611 bool ret = true; in oom_reap_task_mm() local 632 ret = __oom_reap_task_mm(mm); in oom_reap_task_mm() [all …]
|
D | page_pinner.c | 226 int ret; in print_page_pinner() local 237 ret = snprintf(kbuf, count, "Page pinned for %lld us\n", in print_page_pinner() 243 ret = snprintf(kbuf, count, in print_page_pinner() 248 if (ret >= count) in print_page_pinner() 252 ret += snprintf(kbuf + ret, count - ret, in print_page_pinner() 260 if (ret >= count) in print_page_pinner() 264 ret += stack_trace_snprint(kbuf + ret, count - ret, entries, in print_page_pinner() 266 if (ret >= count) in print_page_pinner() 269 ret += snprintf(kbuf + ret, count - ret, "\n"); in print_page_pinner() 270 if (ret >= count) in print_page_pinner() [all …]
|
D | cma.c | 253 int ret = 0; in cma_declare_contiguous_nid() local 285 ret = -EINVAL; in cma_declare_contiguous_nid() 306 ret = -EINVAL; in cma_declare_contiguous_nid() 321 ret = -EINVAL; in cma_declare_contiguous_nid() 331 ret = -EBUSY; in cma_declare_contiguous_nid() 370 ret = -ENOMEM; in cma_declare_contiguous_nid() 383 ret = cma_init_reserved_mem(base, size, order_per_bit, name, res_cma); in cma_declare_contiguous_nid() 384 if (ret) in cma_declare_contiguous_nid() 395 return ret; in cma_declare_contiguous_nid() 446 int ret = -ENOMEM; in cma_alloc() local [all …]
|
D | page_owner.c | 391 int ret, pageblock_mt, page_mt; in print_page_owner() local 401 ret = snprintf(kbuf, count, in print_page_owner() 407 if (ret >= count) in print_page_owner() 413 ret += snprintf(kbuf + ret, count - ret, in print_page_owner() 421 if (ret >= count) in print_page_owner() 425 ret += stack_trace_snprint(kbuf + ret, count - ret, entries, nr_entries, 0); in print_page_owner() 426 if (ret >= count) in print_page_owner() 430 ret += snprintf(kbuf + ret, count - ret, in print_page_owner() 433 if (ret >= count) in print_page_owner() 437 ret += snprintf(kbuf + ret, count - ret, "\n"); in print_page_owner() [all …]
|
D | frame_vector.c | 43 int ret = 0; in get_vaddr_frames() local 58 ret = -EFAULT; in get_vaddr_frames() 71 ret = -EOPNOTSUPP; in get_vaddr_frames() 78 ret = pin_user_pages_locked(start, nr_frames, in get_vaddr_frames() 80 if (likely(ret > 0)) in get_vaddr_frames() 89 if (!ret) in get_vaddr_frames() 90 ret = -EFAULT; in get_vaddr_frames() 91 if (ret > 0) in get_vaddr_frames() 92 vec->nr_frames = ret; in get_vaddr_frames() 93 return ret; in get_vaddr_frames()
|
D | vmpressure.c | 165 bool ret = false; in vmpressure_event() local 176 ret = true; in vmpressure_event() 180 return ret; in vmpressure_event() 383 int ret = 0; in vmpressure_register_event() local 391 ret = match_string(vmpressure_str_levels, VMPRESSURE_NUM_LEVELS, token); in vmpressure_register_event() 392 if (ret < 0) in vmpressure_register_event() 394 level = ret; in vmpressure_register_event() 399 ret = match_string(vmpressure_str_modes, VMPRESSURE_NUM_MODES, token); in vmpressure_register_event() 400 if (ret < 0) in vmpressure_register_event() 402 mode = ret; in vmpressure_register_event() [all …]
|
D | huge_memory.c | 190 ssize_t ret = count; in enabled_store() local 202 ret = -EINVAL; in enabled_store() 204 if (ret > 0) { in enabled_store() 207 ret = err; in enabled_store() 209 return ret; in enabled_store() 228 int ret; in single_hugepage_flag_store() local 230 ret = kstrtoul(buf, 10, &value); in single_hugepage_flag_store() 231 if (ret < 0) in single_hugepage_flag_store() 232 return ret; in single_hugepage_flag_store() 450 int ret = 0; in setup_transparent_hugepage() local [all …]
|
D | memory-failure.c | 240 int ret = 0; in kill_proc() local 247 ret = force_sig_mceerr(BUS_MCEERR_AR, in kill_proc() 256 ret = send_sig_mceerr(BUS_MCEERR_AO, (void __user *)tk->addr, in kill_proc() 259 if (ret < 0) in kill_proc() 261 t->comm, t->pid, ret); in kill_proc() 262 return ret; in kill_proc() 623 int ret = MF_FAILED; in truncate_error_page() local 636 ret = MF_RECOVERED; in truncate_error_page() 644 ret = MF_RECOVERED; in truncate_error_page() 650 return ret; in truncate_error_page() [all …]
|
D | filemap.c | 372 int ret = 0; in filemap_check_errors() local 376 ret = -ENOSPC; in filemap_check_errors() 379 ret = -EIO; in filemap_check_errors() 380 return ret; in filemap_check_errors() 414 int ret; in __filemap_fdatawrite_range() local 427 ret = do_writepages(mapping, &wbc); in __filemap_fdatawrite_range() 429 return ret; in __filemap_fdatawrite_range() 945 int ret; in add_to_page_cache_lru() local 948 ret = __add_to_page_cache_locked(page, mapping, offset, in add_to_page_cache_lru() 950 if (unlikely(ret)) in add_to_page_cache_lru() [all …]
|
D | memcontrol.c | 304 int ret; in obj_cgroup_alloc() local 310 ret = percpu_ref_init(&objcg->refcnt, obj_cgroup_release, 0, in obj_cgroup_alloc() 312 if (ret) { in obj_cgroup_alloc() 458 int nid, size, ret = 0; in memcg_alloc_shrinker_maps() local 469 ret = -ENOMEM; in memcg_alloc_shrinker_maps() 476 return ret; in memcg_alloc_shrinker_maps() 481 int size, old_size, ret = 0; in memcg_expand_shrinker_maps() local 496 ret = memcg_expand_one_shrinker_map(memcg, size, old_size); in memcg_expand_shrinker_maps() 497 if (ret) { in memcg_expand_shrinker_maps() 503 if (!ret) in memcg_expand_shrinker_maps() [all …]
|
/mm/damon/ |
D | dbgfs.c | 29 ssize_t ret; in user_input_str() local 39 ret = simple_write_to_buffer(kbuf, count + 1, ppos, buf, count); in user_input_str() 40 if (ret != count) { in user_input_str() 44 kbuf[ret] = '\0'; in user_input_str() 54 int ret; in dbgfs_attrs_read() local 57 ret = scnprintf(kbuf, ARRAY_SIZE(kbuf), "%lu %lu %lu %lu %lu\n", in dbgfs_attrs_read() 63 return simple_read_from_buffer(buf, count, ppos, kbuf, ret); in dbgfs_attrs_read() 72 ssize_t ret; in dbgfs_attrs_write() local 80 ret = -EINVAL; in dbgfs_attrs_write() 86 ret = -EBUSY; in dbgfs_attrs_write() [all …]
|