diff options
Diffstat (limited to 'mm/hugetlb_cgroup.c')
-rw-r--r-- | mm/hugetlb_cgroup.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/mm/hugetlb_cgroup.c b/mm/hugetlb_cgroup.c index 9aae6f47433f..9eebfadeeee1 100644 --- a/mm/hugetlb_cgroup.c +++ b/mm/hugetlb_cgroup.c @@ -275,6 +275,7 @@ static ssize_t hugetlb_cgroup_write(struct kernfs_open_file *of, ret = res_counter_memparse_write_strategy(buf, &val); if (ret) break; + val = ALIGN(val, 1ULL << huge_page_shift(&hstates[idx])); ret = res_counter_set_limit(&h_cg->hugepage[idx], val); break; default: |