diff options
Diffstat (limited to 'mm')
-rw-r--r-- | mm/page_cgroup.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/page_cgroup.c b/mm/page_cgroup.c index 4eb0530..5524e8b 100644 --- a/mm/page_cgroup.c +++ b/mm/page_cgroup.c @@ -475,7 +475,7 @@ int swap_cgroup_swapon(int type, unsigned long max_pages) if (!do_swap_account) return 0; - length = ((max_pages/SC_PER_PAGE) + 1); + length = DIV_ROUND_UP(max_pages, SC_PER_PAGE); array_size = length * sizeof(void *); array = vmalloc(array_size); |