Message ID | 20200828033242.8787-3-richard.weiyang@linux.alibaba.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | mm/hugetlb: code refine and simplification | expand |
On 8/27/20 8:32 PM, Wei Yang wrote: > We are sure to get a valid file_region, otherwise the > VM_BUG_ON(resv->region_cache_count <= 0) at the very beginning would be > triggered. > > Let's remove the redundant one. > > Signed-off-by: Wei Yang <richard.weiyang@linux.alibaba.com> Thank you. Reviewed-by: Mike Kravetz <mike.kravetz@oracle.com>
diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 62ec74f6d03f..f325839be617 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -238,7 +238,6 @@ get_file_region_entry_from_cache(struct resv_map *resv, long from, long to) resv->region_cache_count--; nrg = list_first_entry(&resv->region_cache, struct file_region, link); - VM_BUG_ON(!nrg); list_del(&nrg->link); nrg->from = from;
We are sure to get a valid file_region, otherwise the VM_BUG_ON(resv->region_cache_count <= 0) at the very beginning would be triggered. Let's remove the redundant one. Signed-off-by: Wei Yang <richard.weiyang@linux.alibaba.com> --- mm/hugetlb.c | 1 - 1 file changed, 1 deletion(-)