|
@@ -475,7 +475,7 @@ int swap_cgroup_swapon(int type, unsigned long max_pages)
|
|
if (!do_swap_account)
|
|
if (!do_swap_account)
|
|
return 0;
|
|
return 0;
|
|
|
|
|
|
- length = ((max_pages/SC_PER_PAGE) + 1);
|
|
|
|
|
|
+ length = DIV_ROUND_UP(max_pages, SC_PER_PAGE);
|
|
array_size = length * sizeof(void *);
|
|
array_size = length * sizeof(void *);
|
|
|
|
|
|
array = vmalloc(array_size);
|
|
array = vmalloc(array_size);
|