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.weiy...@linux.alibaba.com>
---
 mm/hugetlb.c | 1 -
 1 file changed, 1 deletion(-)

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;
-- 
2.20.1 (Apple Git-117)

Reply via email to