Re: [PATCH v2 3/5] mm/hugeltb: clarify (chg - freed) won't go negative in hugetlb_unreserve_pages()

2021-04-12 Thread Mike Kravetz
On 4/10/21 12:23 AM, Miaohe Lin wrote: > The resv_map could be NULL since this routine can be called in the evict > inode path for all hugetlbfs inodes and we will have chg = 0 in this case. > But (chg - freed) won't go negative as Mike pointed out: > > "If resv_map is NULL, then no hugetlb

[PATCH v2 3/5] mm/hugeltb: clarify (chg - freed) won't go negative in hugetlb_unreserve_pages()

2021-04-10 Thread Miaohe Lin
The resv_map could be NULL since this routine can be called in the evict inode path for all hugetlbfs inodes and we will have chg = 0 in this case. But (chg - freed) won't go negative as Mike pointed out: "If resv_map is NULL, then no hugetlb pages can be allocated/associated with the file.