]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
mm/hugetlb: remove VM_BUG_ON(!nrg) in get_file_region_entry_from_cache()
authorWei Yang <richard.weiyang@linux.alibaba.com>
Tue, 13 Oct 2020 23:56:23 +0000 (16:56 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 14 Oct 2020 01:38:34 +0000 (18:38 -0700)
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>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Mike Kravetz <mike.kravetz@oracle.com>
Cc: Baoquan He <bhe@redhat.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Link: https://lkml.kernel.org/r/20200831022351.20916-3-richard.weiyang@linux.alibaba.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/hugetlb.c

index dc2977750e853dc688a19be08cf528a1b08a9e83..39f86bbcb07e18f357b1efe9d6b54e790bef5f93 100644 (file)
@@ -240,7 +240,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;