Lines Matching refs:maxpages

2831 	unsigned long maxpages;  in read_swap_header()  local
2861 maxpages = swapfile_maximum_size; in read_swap_header()
2867 if (last_page > maxpages) { in read_swap_header()
2869 maxpages << (PAGE_SHIFT - 10), in read_swap_header()
2872 if (maxpages > last_page) { in read_swap_header()
2873 maxpages = last_page + 1; in read_swap_header()
2875 if ((unsigned int)maxpages == 0) in read_swap_header()
2876 maxpages = UINT_MAX; in read_swap_header()
2878 p->highest_bit = maxpages - 1; in read_swap_header()
2880 if (!maxpages) in read_swap_header()
2883 if (swapfilepages && maxpages > swapfilepages) { in read_swap_header()
2892 return maxpages; in read_swap_header()
2906 unsigned long maxpages, in setup_swap_map_and_extents() argument
2912 unsigned long nr_clusters = DIV_ROUND_UP(maxpages, SWAPFILE_CLUSTER); in setup_swap_map_and_extents()
2916 nr_good_pages = maxpages - 1; /* omit header page */ in setup_swap_map_and_extents()
2925 if (page_nr < maxpages) { in setup_swap_map_and_extents()
2937 for (i = maxpages; i < round_up(maxpages, SWAPFILE_CLUSTER); i++) in setup_swap_map_and_extents()
2947 p->max = maxpages; in setup_swap_map_and_extents()
2995 unsigned long maxpages; in SYSCALL_DEFINE2() local
3064 maxpages = read_swap_header(p, swap_header, inode); in SYSCALL_DEFINE2()
3065 if (unlikely(!maxpages)) { in SYSCALL_DEFINE2()
3071 swap_map = vzalloc(maxpages); in SYSCALL_DEFINE2()
3101 nr_cluster = DIV_ROUND_UP(maxpages, SWAPFILE_CLUSTER); in SYSCALL_DEFINE2()
3128 error = swap_cgroup_swapon(p->type, maxpages); in SYSCALL_DEFINE2()
3133 cluster_info, maxpages, &span); in SYSCALL_DEFINE2()
3140 frontswap_map = kvcalloc(BITS_TO_LONGS(maxpages), in SYSCALL_DEFINE2()
3175 error = init_swap_address_space(p->type, maxpages); in SYSCALL_DEFINE2()