Re: [PATCH] mm/hugetlb: Do not call vma_add_reservation upon ENOMEM

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, May 29, 2024 at 08:43:06AM -0700, Breno Leitao wrote:
> vma_needs_reservation returns a long.
> 
> 	static long vma_needs_reservation(struct hstate *h,
> 				struct vm_area_struct *vma, unsigned long addr)

Yeah, I missed that, thanks.

@Andrew: Can you fold the following in? Thanks


diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index f35abff8be60..0b9e64aa279b 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -5769,7 +5769,7 @@ void __unmap_hugepage_range(struct mmu_gather *tlb, struct vm_area_struct *vma,
 		 * forever.
 		 */
 		if (adjust_reservation) {
-			int rc = vma_needs_reservation(h, vma, address);
+			long rc = vma_needs_reservation(h, vma, address);
 
 			if (rc < 0)
 				/* Pressumably allocate_file_region_entries failed

> Reviewed-by: Breno Leitao <leitao@xxxxxxxxxx>

Thanks


-- 
Oscar Salvador
SUSE Labs




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux