From: Miaohe Lin Date: Wed, 5 May 2021 01:34:30 +0000 (-0700) Subject: mm/hugeltb: remove redundant VM_BUG_ON() in region_add() X-Git-Tag: accepted/tizen/unified/20230118.172025~7280^2~109 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f84df0b7f1b603f6c99670bdf2f908f0b6a5ed59;p=platform%2Fkernel%2Flinux-rpi.git mm/hugeltb: remove redundant VM_BUG_ON() in region_add() Patch series "Cleanup and fixup for hugetlb", v2. This series contains cleanups to remove redundant VM_BUG_ON() and simplify the return code. Also this handles the error case in hugetlb_fix_reserve_counts() correctly. More details can be found in the respective changelogs. This patch (of 5): The same VM_BUG_ON() check is already done in the callee. Remove this extra one to simplify the code slightly. Link: https://lkml.kernel.org/r/20210410072348.20437-1-linmiaohe@huawei.com Link: https://lkml.kernel.org/r/20210410072348.20437-2-linmiaohe@huawei.com Signed-off-by: Miaohe Lin Reviewed-by: Mike Kravetz Cc: Feilong Lin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/hugetlb.c b/mm/hugetlb.c index c8f0a38..ce9e18d 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -553,7 +553,6 @@ retry: resv->adds_in_progress -= in_regions_needed; spin_unlock(&resv->lock); - VM_BUG_ON(add < 0); return add; }