Lines Matching refs:maxpages
2827 unsigned long maxpages; in read_swap_header() local
2857 maxpages = swapfile_maximum_size; in read_swap_header()
2863 if (last_page > maxpages) { in read_swap_header()
2865 K(maxpages), K(last_page)); in read_swap_header()
2867 if (maxpages > last_page) { in read_swap_header()
2868 maxpages = last_page + 1; in read_swap_header()
2870 if ((unsigned int)maxpages == 0) in read_swap_header()
2871 maxpages = UINT_MAX; in read_swap_header()
2873 p->highest_bit = maxpages - 1; in read_swap_header()
2875 if (!maxpages) in read_swap_header()
2878 if (swapfilepages && maxpages > swapfilepages) { in read_swap_header()
2887 return maxpages; in read_swap_header()
2901 unsigned long maxpages, in setup_swap_map_and_extents() argument
2907 unsigned long nr_clusters = DIV_ROUND_UP(maxpages, SWAPFILE_CLUSTER); in setup_swap_map_and_extents()
2911 nr_good_pages = maxpages - 1; /* omit header page */ in setup_swap_map_and_extents()
2920 if (page_nr < maxpages) { in setup_swap_map_and_extents()
2932 for (i = maxpages; i < round_up(maxpages, SWAPFILE_CLUSTER); i++) in setup_swap_map_and_extents()
2942 p->max = maxpages; in setup_swap_map_and_extents()
2990 unsigned long maxpages; in SYSCALL_DEFINE2() local
3058 maxpages = read_swap_header(p, swap_header, inode); in SYSCALL_DEFINE2()
3059 if (unlikely(!maxpages)) { in SYSCALL_DEFINE2()
3065 swap_map = vzalloc(maxpages); in SYSCALL_DEFINE2()
3095 nr_cluster = DIV_ROUND_UP(maxpages, SWAPFILE_CLUSTER); in SYSCALL_DEFINE2()
3122 error = swap_cgroup_swapon(p->type, maxpages); in SYSCALL_DEFINE2()
3127 cluster_info, maxpages, &span); in SYSCALL_DEFINE2()
3164 error = init_swap_address_space(p->type, maxpages); in SYSCALL_DEFINE2()