--- a/mm/hugetlb.c~mm-hugetlb-avoid-unnecessary-hugetlb_acct_memory-call +++ a/mm/hugetlb.c @@ -3591,6 +3591,9 @@ static int hugetlb_acct_memory(struct hs { int ret = -ENOMEM; + if (!delta) + return 0; + spin_lock(&hugetlb_lock); /* * When cpuset is configured, it breaks the strict hugetlb page