Re: [PATCH 1/2] mm/hugetlb: change hugetlb_reserve_pages() to type bool

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

 



On Mon, Dec 21, 2020 at 11:25:41AM -0800, Mike Kravetz wrote:
> While reviewing a bug in hugetlb_reserve_pages, it was noticed that all
> callers ignore the return value.  Any failure is considered an ENOMEM
> error by the callers.
> 
> Change the function to be of type bool.  The function will return true
> if the reservation was successful, false otherwise.  Callers currently
> assume a zero return code indicates success.  Change the callers to look
> for true to indicate success.  No functional change, only code cleanup.
> 
> Signed-off-by: Mike Kravetz <mike.kravetz@xxxxxxxxxx>

Reviewed-by: Matthew Wilcox (Oracle) <willy@xxxxxxxxxxxxx>




[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